summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/assoc-const-as-field.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/suggestions/assoc-const-as-field.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/assoc-const-as-field.rs b/src/test/ui/suggestions/assoc-const-as-field.rs
new file mode 100644
index 000000000..678b58936
--- /dev/null
+++ b/src/test/ui/suggestions/assoc-const-as-field.rs
@@ -0,0 +1,13 @@
+pub mod Mod {
+ pub struct Foo {}
+ impl Foo {
+ pub const BAR: usize = 42;
+ }
+}
+
+fn foo(_: usize) {}
+
+fn main() {
+ foo(Mod::Foo.Bar);
+ //~^ ERROR expected value, found
+}