]> git.lizzy.rs Git - rust.git/blob - src/test/ui/foreign-unsafe-fn-called.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / ui / foreign-unsafe-fn-called.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 mod test {
5     extern "C" {
6         pub fn free();
7     }
8 }
9
10 fn main() {
11     test::free();
12     //[mir]~^ ERROR call to unsafe function is unsafe
13     //[thir]~^^ ERROR call to unsafe function `test::free` is unsafe
14 }