We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07d0d7c commit 6761a91Copy full SHA for 6761a91
tests/ui/const-generics/adt_const_params/index-oob-ice-83993.rs
@@ -0,0 +1,20 @@
1
+// issue: rust-lang/rust/#83993
2
+
3
+#![feature(adt_const_params)]
4
+//~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
5
+fn bug<'a>()
6
+where
7
+ for<'b> [(); {
8
+ let x: &'b ();
9
+ //~^ ERROR generic parameters may not be used in const operations
10
+ //~| WARN unused variable: `x`
11
+ 0
12
+ }]:
13
+{}
14
15
+fn bad() where for<'b> [();{let _:&'b (); 0}]: Sized { }
16
+//~^ ERROR generic parameters may not be used in const operations
17
+fn good() where for<'b> [();{0}]: Sized { }
18
+//~^ WARN unnecessary braces around const expression
19
20
+pub fn main() {}
0 commit comments