1 2 3 4 5 6 7 8 9 10 11
struct Foo; impl Foo { const A_CONST: usize = 1; fn foo() -> usize { A_CONST //~ ERROR cannot find value `A_CONST` in this scope } } fn main() {}