rust/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.rs

15 lines
264 B
Rust

// Check for recursion involving references to impl-associated const.
trait Foo {
const BAR: u32;
}
const IMPL_REF_BAR: u32 = GlobalImplRef::BAR; //~ ERROR E0391
struct GlobalImplRef;
impl GlobalImplRef {
const BAR: u32 = IMPL_REF_BAR;
}
fn main() {}