]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / borrowck / issue-88434-removal-index-should-be-less.rs
1 // Regression test for issue 88434
2
3 const _CONST: &[u8] = &f(&[], |_| {});
4 //~^ ERROR any use of this value will cause an error
5 //~| WARNING this was previously
6
7 const fn f<F>(_: &[u8], _: F) -> &[u8]
8 where
9     F: FnMut(&u8),
10 {
11     panic!() //~ ERROR evaluation of constant value failed
12 }
13
14 fn main() { }