@@ -2,12 +2,11 @@ error[E0277]: expected a `Fn()` closure, found `#[target_features] fn() {foo}`
22  --> $DIR/fn-traits.rs:24:10
33   |
44LL |     call(foo);
5-    |     ---- ^^^ call the function in a  closure: `|| unsafe { /* code */  }`
5+    |     ---- ^^^ expected an `Fn()`  closure, found `#[target_features] fn() {foo }`
66   |     |
77   |     required by a bound introduced by this call
88   |
99   = help: the trait `Fn()` is not implemented for fn item `#[target_features] fn() {foo}`
10-    = note: unsafe function cannot be called generically without an unsafe block
1110   = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
1211   = note: `#[target_feature]` functions do not implement the `Fn` traits
1312note: required by a bound in `call`
@@ -20,12 +19,11 @@ error[E0277]: expected a `FnMut()` closure, found `#[target_features] fn() {foo}
2019  --> $DIR/fn-traits.rs:25:14
2120   |
2221LL |     call_mut(foo);
23-    |     -------- ^^^ call the function in a  closure: `|| unsafe { /* code */  }`
22+    |     -------- ^^^ expected an `FnMut()`  closure, found `#[target_features] fn() {foo }`
2423   |     |
2524   |     required by a bound introduced by this call
2625   |
2726   = help: the trait `FnMut()` is not implemented for fn item `#[target_features] fn() {foo}`
28-    = note: unsafe function cannot be called generically without an unsafe block
2927   = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
3028   = note: `#[target_feature]` functions do not implement the `Fn` traits
3129note: required by a bound in `call_mut`
@@ -38,12 +36,11 @@ error[E0277]: expected a `FnOnce()` closure, found `#[target_features] fn() {foo
3836  --> $DIR/fn-traits.rs:26:15
3937   |
4038LL |     call_once(foo);
41-    |     --------- ^^^ call the function in a  closure: `|| unsafe { /* code */  }`
39+    |     --------- ^^^ expected an `FnOnce()`  closure, found `#[target_features] fn() {foo }`
4240   |     |
4341   |     required by a bound introduced by this call
4442   |
4543   = help: the trait `FnOnce()` is not implemented for fn item `#[target_features] fn() {foo}`
46-    = note: unsafe function cannot be called generically without an unsafe block
4744   = note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
4845   = note: `#[target_feature]` functions do not implement the `Fn` traits
4946note: required by a bound in `call_once`
0 commit comments