]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, r=joshtriplett
[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() { }