summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/issue-88434-removal-index-should-be-less.rs
blob: b1fc1615ece7728e0c8eb4c76e18e9206a5b2cf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Regression test for issue 88434

const _CONST: &[u8] = &f(&[], |_| {});
//~^ ERROR any use of this value will cause an error
//~| WARNING this was previously

const fn f<F>(_: &[u8], _: F) -> &[u8]
where
    F: FnMut(&u8),
{
    panic!() //~ ERROR evaluation of constant value failed
}

fn main() { }