]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsafe/unsafe-fn-called-from-safe.rs
Rollup merge of #103033 - alyssais:pkg-config, r=joshtriplett
[rust.git] / src / test / 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 }