@@ -2,12 +2,11 @@ error[E0277]: expected a `Fn()` closure, found `#[target_features] fn() {foo}`
2
2
--> $DIR/fn-traits.rs:24:10
3
3
|
4
4
LL | call(foo);
5
- | ---- ^^^ call the function in a closure: `|| unsafe { /* code */ }`
5
+ | ---- ^^^ expected an `Fn()` closure, found `#[target_features] fn() {foo }`
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
9
= 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
11
10
= note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
12
11
= note: `#[target_feature]` functions do not implement the `Fn` traits
13
12
note: required by a bound in `call`
@@ -20,12 +19,11 @@ error[E0277]: expected a `FnMut()` closure, found `#[target_features] fn() {foo}
20
19
--> $DIR/fn-traits.rs:25:14
21
20
|
22
21
LL | call_mut(foo);
23
- | -------- ^^^ call the function in a closure: `|| unsafe { /* code */ }`
22
+ | -------- ^^^ expected an `FnMut()` closure, found `#[target_features] fn() {foo }`
24
23
| |
25
24
| required by a bound introduced by this call
26
25
|
27
26
= 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
29
27
= note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
30
28
= note: `#[target_feature]` functions do not implement the `Fn` traits
31
29
note: required by a bound in `call_mut`
@@ -38,12 +36,11 @@ error[E0277]: expected a `FnOnce()` closure, found `#[target_features] fn() {foo
38
36
--> $DIR/fn-traits.rs:26:15
39
37
|
40
38
LL | call_once(foo);
41
- | --------- ^^^ call the function in a closure: `|| unsafe { /* code */ }`
39
+ | --------- ^^^ expected an `FnOnce()` closure, found `#[target_features] fn() {foo }`
42
40
| |
43
41
| required by a bound introduced by this call
44
42
|
45
43
= 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
47
44
= note: wrap the `#[target_features] fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
48
45
= note: `#[target_feature]` functions do not implement the `Fn` traits
49
46
note: required by a bound in `call_once`
0 commit comments