rust/src/test/ui/unsafe/unsafe-fn-called-from-safe.rs
Oli Scherer 3568bdc6cd Revert "add DefId to unsafety violations and display function path in E0133"
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
2022-04-26 14:49:28 +00:00

11 lines
229 B
Rust

// 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
}