about summary refs log tree commit diff
path: root/src/test/ui/rfcs
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-04-05 11:13:48 -0700
committerMichael Howell <michael@notriddle.com>2022-04-05 11:13:48 -0700
commit6d18fbbc3f1fee9e717ae5f55bd2970d96e2b5cb (patch)
tree4278d8e877dfe48cdbdcd1b5e465c5d729c7da3b /src/test/ui/rfcs
parentdcf7ce8356ce9182d65b0719216ec08db877d5cc (diff)
downloadrust-6d18fbbc3f1fee9e717ae5f55bd2970d96e2b5cb.tar.gz
rust-6d18fbbc3f1fee9e717ae5f55bd2970d96e2b5cb.zip
diagnostics: tweak error message to give more rationale to unsafe Fn
Diffstat (limited to 'src/test/ui/rfcs')
-rw-r--r--src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
index ea22d1c89b1..94a90a56854 100644
--- a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
+++ b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
@@ -53,7 +53,7 @@ error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:28:10
    |
 LL |     call(foo_unsafe);
-   |     ---- ^^^^^^^^^^ expected an `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
+   |     ---- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
    |     |
    |     required by a bound introduced by this call
    |
@@ -70,7 +70,7 @@ error[E0277]: expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:30:14
    |
 LL |     call_mut(foo_unsafe);
-   |     -------- ^^^^^^^^^^ expected an `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
+   |     -------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
    |     |
    |     required by a bound introduced by this call
    |
@@ -87,7 +87,7 @@ error[E0277]: expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:32:15
    |
 LL |     call_once(foo_unsafe);
-   |     --------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
+   |     --------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
    |     |
    |     required by a bound introduced by this call
    |