1
Fork 0

Revert "add DefId to unsafety violations and display function path in E0133"

This reverts commit 8b8f6653cf.
This commit is contained in:
Oli Scherer 2022-04-26 10:43:00 +00:00
parent 1c988cfa0b
commit 3568bdc6cd
29 changed files with 208 additions and 204 deletions

View file

@ -11,11 +11,15 @@ impl S {
async unsafe fn f() {}
async fn g() {
S::f(); //~ ERROR call to unsafe function `S::f` is unsafe
f(); //~ ERROR call to unsafe function `f` is unsafe
S::f();
//[mir]~^ ERROR call to unsafe function is unsafe
//[thir]~^^ ERROR call to unsafe function `S::f` is unsafe
f();
//[mir]~^ ERROR call to unsafe function is unsafe
//[thir]~^^ ERROR call to unsafe function `f` is unsafe
}
fn main() {
S::f(); //[mir]~ ERROR call to unsafe function `S::f` is unsafe
f(); //[mir]~ ERROR call to unsafe function `f` is unsafe
S::f(); //[mir]~ ERROR call to unsafe function is unsafe
f(); //[mir]~ ERROR call to unsafe function is unsafe
}