summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-consts/associated-const-inherent-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-consts/associated-const-inherent-impl.rs')
-rw-r--r--src/test/ui/associated-consts/associated-const-inherent-impl.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/associated-consts/associated-const-inherent-impl.rs b/src/test/ui/associated-consts/associated-const-inherent-impl.rs
new file mode 100644
index 000000000..c6d956dff
--- /dev/null
+++ b/src/test/ui/associated-consts/associated-const-inherent-impl.rs
@@ -0,0 +1,11 @@
+// run-pass
+
+struct Foo;
+
+impl Foo {
+ const ID: i32 = 1;
+}
+
+fn main() {
+ assert_eq!(1, Foo::ID);
+}