rust/src/test/ui/foreign-unsafe-fn-called.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

15 lines
280 B
Rust

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
mod test {
extern "C" {
pub fn free();
}
}
fn main() {
test::free();
//[mir]~^ ERROR call to unsafe function is unsafe
//[thir]~^^ ERROR call to unsafe function `test::free` is unsafe
}