about summary refs log tree commit diff
path: root/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs
blob: cce59124adedb57096b7533938127dc35df6e1cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for issue 88434

//@ dont-require-annotations: NOTE

const _CONST: &[u8] = &f(&[], |_| {}); //~ ERROR explicit panic
//~^ NOTE constant

const fn f<F>(_: &[u8], _: F) -> &[u8]
where
    F: FnMut(&u8),
{
    panic!() //~ NOTE inside `f
}

fn main() {}