summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsafe/unsafe-fn-called-from-safe.rs
blob: 55072dcc6c314e1f1a3bb382c4ece9282074d5d7 (plain)
1
2
3
4
5
6
7
8
9
10
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck

unsafe fn f() { return; }

fn main() {
    f();
    //[mir]~^ ERROR call to unsafe function is unsafe
    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
}