mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
16 lines
270 B
Rust
16 lines
270 B
Rust
// 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() {}
|