summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.rs
blob: 0315938a7eda60034184c049e4100fe61cfbfa9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Check for recursion involving references to impl-associated const.

trait Foo {
    const BAR: u32;
}

const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;

struct GlobalImplRef;

impl GlobalImplRef {
    const BAR: u32 = IMPL_REF_BAR; //~ ERROR E0391
}

fn main() {}