rust/src/test/compile-fail/unsafe-fn-used-in-bind.rs
Niko Matsakis e8a0e592da reimplement some of the unsafe stuff which got lost
- blocks inherit unsafety
  - remove the --check-unsafe flag
  - add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00

10 lines
180 B
Rust

// -*- rust -*-
// error-pattern: unsafe functions can only be called
unsafe fn f(x: int, y: int) -> int { ret x + y; }
fn main() {
let x = bind f(3, _);
let y = x(4);
}