rust/src/test/compile-fail/unsafe-fn-used-as-value.rs
Gareth Daniel Smith 6d86969260 change the test suite //! kind syntax to //~ kind in order to avoid a
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
2012-06-30 12:23:59 +01: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();
}