rust/tests/ui/suggestions/assoc-const-without-self.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
169 B
Rust
Raw Normal View History

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() {}