about summary refs log tree commit diff
path: root/tests/ui/associated-consts/assoc-const.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-consts/assoc-const.rs')
-rw-r--r--tests/ui/associated-consts/assoc-const.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/associated-consts/assoc-const.rs b/tests/ui/associated-consts/assoc-const.rs
new file mode 100644
index 00000000000..9c7884c8073
--- /dev/null
+++ b/tests/ui/associated-consts/assoc-const.rs
@@ -0,0 +1,22 @@
+// run-pass
+#![feature(associated_const_equality)]
+#![allow(unused)]
+
+pub trait Foo {
+  const N: usize;
+}
+
+pub struct Bar;
+
+impl Foo for Bar {
+  const N: usize = 3;
+}
+
+const TEST:usize = 3;
+
+
+fn foo<F: Foo<N=3usize>>() {}
+
+fn main() {
+  foo::<Bar>()
+}