about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/const-generics/unused-const-param.rs8
-rw-r--r--src/test/ui/const-generics/unused-const-param.stderr6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/unused-const-param.rs b/src/test/ui/const-generics/unused-const-param.rs
new file mode 100644
index 00000000000..ee98e5eb4a0
--- /dev/null
+++ b/src/test/ui/const-generics/unused-const-param.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+#![feature(const_generics)]
+//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
+
+struct A<const N: usize>; // ok
+
+fn main() {}
diff --git a/src/test/ui/const-generics/unused-const-param.stderr b/src/test/ui/const-generics/unused-const-param.stderr
new file mode 100644
index 00000000000..0e7acfb673d
--- /dev/null
+++ b/src/test/ui/const-generics/unused-const-param.stderr
@@ -0,0 +1,6 @@
+warning: the feature `const_generics` is incomplete and may cause the compiler to crash
+  --> $DIR/unused-const-param.rs:3:12
+   |
+LL | #![feature(const_generics)]
+   |            ^^^^^^^^^^^^^^
+