rust/tests/ui/mir/auxiliary/static_fnptr.rs
2024-05-04 19:26:50 +00:00

11 lines
129 B
Rust

//@ compile-flags:-O
fn foo() {}
pub static ADDR: fn() = foo;
#[inline(always)]
pub fn bar(x: fn()) -> bool {
x == ADDR
}