]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-81899.rs
Rollup merge of #102500 - compiler-errors:parse-sess-cleanup, r=cjgillot
[rust.git] / src / test / ui / borrowck / issue-81899.rs
1 // Regression test for #81899.
2 // The `panic!()` below is important to trigger the fixed ICE.
3
4 const _CONST: &[u8] = &f(&[], |_| {});
5 //~^ ERROR any use of this value
6 //~| WARNING this was previously
7
8 const fn f<F>(_: &[u8], _: F) -> &[u8]
9 where
10     F: FnMut(&u8),
11 {
12     panic!() //~ ERROR: evaluation of constant value failed
13 }
14
15 fn main() {}