about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEmil Gardström <emil.gardstrom@gmail.com>2022-04-24 14:08:23 +0200
committerEmil Gardström <emil.gardstrom@gmail.com>2022-04-24 18:33:06 +0200
commit8b8f6653cfd54525714f02efe7af0a0f830e185c (patch)
tree08350f3a61cde865ec0fa0ca084b874e88a389f3 /src/test/ui/error-codes
parentd8e59edbfa47ff38e23e6dedab6bedd3b41895e0 (diff)
downloadrust-8b8f6653cfd54525714f02efe7af0a0f830e185c.tar.gz
rust-8b8f6653cfd54525714f02efe7af0a0f830e185c.zip
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
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0133.mir.stderr4
-rw-r--r--src/test/ui/error-codes/E0133.thir.stderr4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/error-codes/E0133.mir.stderr b/src/test/ui/error-codes/E0133.mir.stderr
index b11d5e2c2fc..7d6dc0c7f09 100644
--- a/src/test/ui/error-codes/E0133.mir.stderr
+++ b/src/test/ui/error-codes/E0133.mir.stderr
@@ -1,8 +1,8 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
   --> $DIR/E0133.rs:7:5
    |
 LL |     f();
-   |     ^^^ call to unsafe function
+   |     ^^^ call to unsafe function `f`
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
diff --git a/src/test/ui/error-codes/E0133.thir.stderr b/src/test/ui/error-codes/E0133.thir.stderr
index b11d5e2c2fc..7d6dc0c7f09 100644
--- a/src/test/ui/error-codes/E0133.thir.stderr
+++ b/src/test/ui/error-codes/E0133.thir.stderr
@@ -1,8 +1,8 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
   --> $DIR/E0133.rs:7:5
    |
 LL |     f();
-   |     ^^^ call to unsafe function
+   |     ^^^ call to unsafe function `f`
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior