rust/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
247 B
Rust
Raw Normal View History

// Regression test for issue 88434
const _CONST: &[u8] = &f(&[], |_| {});
//~^ constant
const fn f<F>(_: &[u8], _: F) -> &[u8]
where
F: FnMut(&u8),
{
panic!() //~ ERROR evaluation of constant value failed
//~^ panic
}
fn main() { }