about summary refs log tree commit diff
path: root/src/test/ui/const-generics/different_byref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/different_byref.rs')
-rw-r--r--src/test/ui/const-generics/different_byref.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/different_byref.rs b/src/test/ui/const-generics/different_byref.rs
new file mode 100644
index 00000000000..c52a5b8061d
--- /dev/null
+++ b/src/test/ui/const-generics/different_byref.rs
@@ -0,0 +1,11 @@
+#![feature(const_generics)]
+//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
+
+struct Const<const V: [usize; 1]> {}
+
+fn main() {
+    let mut x = Const::<{ [3] }> {};
+    x = Const::<{ [4] }> {};
+    //~^ ERROR mismatched types
+
+}