add DefId
to unsafety violations and display function path in E0133
this enables consumers to access the function definition that was reported to be unsafe
This commit is contained in:
parent
d8e59edbfa
commit
8b8f6653cf
42 changed files with 228 additions and 200 deletions
|
@ -11,11 +11,11 @@ impl S {
|
|||
async unsafe fn f() {}
|
||||
|
||||
async fn g() {
|
||||
S::f(); //~ ERROR call to unsafe function is unsafe
|
||||
f(); //~ ERROR call to unsafe function is unsafe
|
||||
S::f(); //~ ERROR call to unsafe function `S::f` is unsafe
|
||||
f(); //~ ERROR call to unsafe function `f` is unsafe
|
||||
}
|
||||
|
||||
fn main() {
|
||||
S::f(); //[mir]~ ERROR call to unsafe function is unsafe
|
||||
f(); //[mir]~ ERROR call to unsafe function is unsafe
|
||||
S::f(); //[mir]~ ERROR call to unsafe function `S::f` is unsafe
|
||||
f(); //[mir]~ ERROR call to unsafe function `f` is unsafe
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue