rust/src/test/compile-fail/unsafe-fn-used-as-value.rs
2012-05-09 17:00:19 -07:00

9 lines
149 B
Rust

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