about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/const-generics/issue-60263.rs9
-rw-r--r--src/test/ui/const-generics/issue-60263.stderr12
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/issue-60263.rs b/src/test/ui/const-generics/issue-60263.rs
new file mode 100644
index 00000000000..70cbc242c41
--- /dev/null
+++ b/src/test/ui/const-generics/issue-60263.rs
@@ -0,0 +1,9 @@
+struct B<const I: u8>; //~ ERROR const generics are unstable
+
+impl B<0> {
+    fn bug() -> Self {
+        panic!()
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/const-generics/issue-60263.stderr b/src/test/ui/const-generics/issue-60263.stderr
new file mode 100644
index 00000000000..ab1b9e4a7cd
--- /dev/null
+++ b/src/test/ui/const-generics/issue-60263.stderr
@@ -0,0 +1,12 @@
+error[E0658]: const generics are unstable
+  --> $DIR/issue-60263.rs:1:16
+   |
+LL | struct B<const I: u8>;
+   |                ^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/44580
+   = help: add #![feature(const_generics)] to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.