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