rust/src/test/compile-fail/unsafe-fn-used-as-value.rs

9 lines
149 B
Rust
Raw Normal View History

// -*- rust -*-
unsafe fn f() { ret; }
fn main() {
let x = f; //~ ERROR access to unsafe function requires unsafe function or block
x();
}