Skip to content

Commit 6761a91

Browse files
committed
add test for rust-lang#83993
Fixes rust-lang#83993
1 parent 07d0d7c commit 6761a91

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)