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

12 lines
139 B
Rust

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