summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/assoc-const-without-self.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/assoc-const-without-self.rs')
-rw-r--r--tests/ui/suggestions/assoc-const-without-self.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/suggestions/assoc-const-without-self.rs b/tests/ui/suggestions/assoc-const-without-self.rs
new file mode 100644
index 000000000..95070ec60
--- /dev/null
+++ b/tests/ui/suggestions/assoc-const-without-self.rs
@@ -0,0 +1,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() {}