2022-05-27 11:32:15 -05:00
|
|
|
// Regression test for #81899.
|
|
|
|
// The `panic!()` below is important to trigger the fixed ICE.
|
|
|
|
|
|
|
|
const _CONST: &[u8] = &f(&[], |_| {});
|
2022-11-15 05:06:20 -06:00
|
|
|
//~^ constant
|
2022-05-27 11:32:15 -05:00
|
|
|
|
|
|
|
const fn f<F>(_: &[u8], _: F) -> &[u8]
|
|
|
|
where
|
|
|
|
F: FnMut(&u8),
|
|
|
|
{
|
2022-11-15 05:06:20 -06:00
|
|
|
panic!() //~ ERROR evaluation of constant value failed
|
|
|
|
//~^ panic
|
2022-05-27 11:32:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|