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

10 lines
201 B
Rust

// -*- rust -*-
unsafe fn f(x: int, y: int) -> int { ret x + y; }
fn main() {
let x = bind f(3, _);
//!^ ERROR access to unsafe function requires unsafe function or block
let y = x(4);
}