2024-04-19 11:27:25 -05:00
|
|
|
// issue: rust-lang/rust/#83993
|
|
|
|
|
|
|
|
#![feature(adt_const_params)]
|
2024-07-14 07:38:51 -05:00
|
|
|
|
2024-04-19 11:27:25 -05:00
|
|
|
fn bug<'a>()
|
|
|
|
where
|
|
|
|
for<'b> [(); {
|
|
|
|
let x: &'b ();
|
|
|
|
//~^ ERROR generic parameters may not be used in const operations
|
|
|
|
0
|
2024-07-14 07:38:51 -05:00
|
|
|
}]:,
|
|
|
|
{
|
|
|
|
}
|
2024-04-19 11:27:25 -05:00
|
|
|
|
2024-07-14 07:38:51 -05:00
|
|
|
fn bad()
|
|
|
|
where
|
|
|
|
for<'b> [(); {
|
|
|
|
let _: &'b ();
|
|
|
|
//~^ ERROR generic parameters may not be used in const operations
|
|
|
|
0
|
|
|
|
}]: Sized,
|
|
|
|
{
|
|
|
|
}
|
|
|
|
fn good()
|
|
|
|
where
|
|
|
|
for<'b> [(); { 0 }]: Sized,
|
|
|
|
{
|
|
|
|
}
|
2024-04-19 11:27:25 -05:00
|
|
|
|
|
|
|
pub fn main() {}
|