rust/tests/ui/unsafe/foreign-unsafe-fn-called.rs

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

15 lines
280 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
mod test {
2020-09-01 21:12:52 +00:00
extern "C" {
pub fn free();
}
2011-10-12 01:01:54 +00:00
}
fn main() {
test::free();
//[mir]~^ ERROR call to unsafe function is unsafe
//[thir]~^^ ERROR call to unsafe function `test::free` is unsafe
2011-10-12 01:01:54 +00:00
}