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

9 lines
152 B
Rust
Raw Normal View History

// -*- rust -*-
2012-08-01 19:30:05 -05:00
unsafe fn f() { return; }
fn main() {
let x = f; //~ ERROR access to unsafe function requires unsafe function or block
x();
}