]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/unsafe-fn-called-from-safe.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / unsafe / unsafe-fn-called-from-safe.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 unsafe fn f() { return; }
5
6 fn main() {
7     f();
8     //[mir]~^ ERROR call to unsafe function is unsafe
9     //[thir]~^^ ERROR call to unsafe function `f` is unsafe
10 }