rust/tests/ui/unsafe/unsafe-fn-used-as-value.rs
2024-01-05 10:00:59 +00:00

9 lines
122 B
Rust

unsafe fn f() {
return;
}
fn main() {
let x = f;
x();
//~^ ERROR call to unsafe function `f` is unsafe
}