rust/tests/ui/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 16:12:52 -05:00
extern "C" {
pub fn free();
}
2011-10-11 20:01:54 -05: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-11 20:01:54 -05:00
}