granite-rust/tests/ui/unsafe/unsafe-fn-called-from-safe.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
229 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
2012-08-01 17:30:05 -07:00
unsafe fn f() { return; }
fn main() {
f();
//[mir]~^ ERROR call to unsafe function is unsafe
//[thir]~^^ ERROR call to unsafe function `f` is unsafe
}