]> git.lizzy.rs Git - rust.git/blob - src/test/ui/foreign-unsafe-fn-called.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }