1
1
error[E0277]: expected a `Fn()` closure, found `#[target_features] fn() {foo}`
2
- --> $DIR/fn-traits.rs:31 :10
2
+ --> $DIR/fn-traits.rs:29 :10
3
3
|
4
4
LL | call(foo);
5
5
| ---- ^^^ expected an `Fn()` closure, found `#[target_features] fn() {foo}`
@@ -11,13 +11,13 @@ LL | call(foo);
11
11
= note: `#[target_feature]` functions do not implement the `Fn` traits
12
12
= note: try casting the function to a `fn` pointer or wrapping it in a closure
13
13
note: required by a bound in `call`
14
- --> $DIR/fn-traits.rs:14 :17
14
+ --> $DIR/fn-traits.rs:12 :17
15
15
|
16
16
LL | fn call(f: impl Fn()) {
17
17
| ^^^^ required by this bound in `call`
18
18
19
19
error[E0277]: expected a `FnMut()` closure, found `#[target_features] fn() {foo}`
20
- --> $DIR/fn-traits.rs:32 :14
20
+ --> $DIR/fn-traits.rs:30 :14
21
21
|
22
22
LL | call_mut(foo);
23
23
| -------- ^^^ expected an `FnMut()` closure, found `#[target_features] fn() {foo}`
@@ -29,13 +29,13 @@ LL | call_mut(foo);
29
29
= note: `#[target_feature]` functions do not implement the `Fn` traits
30
30
= note: try casting the function to a `fn` pointer or wrapping it in a closure
31
31
note: required by a bound in `call_mut`
32
- --> $DIR/fn-traits.rs:18 :25
32
+ --> $DIR/fn-traits.rs:16 :25
33
33
|
34
34
LL | fn call_mut(mut f: impl FnMut()) {
35
35
| ^^^^^^^ required by this bound in `call_mut`
36
36
37
37
error[E0277]: expected a `FnOnce()` closure, found `#[target_features] fn() {foo}`
38
- --> $DIR/fn-traits.rs:33 :15
38
+ --> $DIR/fn-traits.rs:31 :15
39
39
|
40
40
LL | call_once(foo);
41
41
| --------- ^^^ expected an `FnOnce()` closure, found `#[target_features] fn() {foo}`
@@ -47,13 +47,13 @@ LL | call_once(foo);
47
47
= note: `#[target_feature]` functions do not implement the `Fn` traits
48
48
= note: try casting the function to a `fn` pointer or wrapping it in a closure
49
49
note: required by a bound in `call_once`
50
- --> $DIR/fn-traits.rs:22 :22
50
+ --> $DIR/fn-traits.rs:20 :22
51
51
|
52
52
LL | fn call_once(f: impl FnOnce()) {
53
53
| ^^^^^^^^ required by this bound in `call_once`
54
54
55
55
error[E0277]: expected a `FnOnce(i32)` closure, found `#[target_features] fn(i32) {bar}`
56
- --> $DIR/fn-traits.rs:34 :19
56
+ --> $DIR/fn-traits.rs:32 :19
57
57
|
58
58
LL | call_once_i32(bar);
59
59
| ------------- ^^^ expected an `FnOnce(i32)` closure, found `#[target_features] fn(i32) {bar}`
@@ -64,13 +64,13 @@ LL | call_once_i32(bar);
64
64
= note: `#[target_feature]` functions do not implement the `Fn` traits
65
65
= note: try casting the function to a `fn` pointer or wrapping it in a closure
66
66
note: required by a bound in `call_once_i32`
67
- --> $DIR/fn-traits.rs:26 :26
67
+ --> $DIR/fn-traits.rs:24 :26
68
68
|
69
69
LL | fn call_once_i32(f: impl FnOnce(i32)) {
70
70
| ^^^^^^^^^^^ required by this bound in `call_once_i32`
71
71
72
72
error[E0277]: expected a `Fn()` closure, found `unsafe fn() {foo_unsafe}`
73
- --> $DIR/fn-traits.rs:36 :10
73
+ --> $DIR/fn-traits.rs:34 :10
74
74
|
75
75
LL | call(foo_unsafe);
76
76
| ---- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -83,13 +83,13 @@ LL | call(foo_unsafe);
83
83
= note: `#[target_feature]` functions do not implement the `Fn` traits
84
84
= note: try casting the function to a `fn` pointer or wrapping it in a closure
85
85
note: required by a bound in `call`
86
- --> $DIR/fn-traits.rs:14 :17
86
+ --> $DIR/fn-traits.rs:12 :17
87
87
|
88
88
LL | fn call(f: impl Fn()) {
89
89
| ^^^^ required by this bound in `call`
90
90
91
91
error[E0277]: expected a `FnMut()` closure, found `unsafe fn() {foo_unsafe}`
92
- --> $DIR/fn-traits.rs:38 :14
92
+ --> $DIR/fn-traits.rs:36 :14
93
93
|
94
94
LL | call_mut(foo_unsafe);
95
95
| -------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -102,13 +102,13 @@ LL | call_mut(foo_unsafe);
102
102
= note: `#[target_feature]` functions do not implement the `Fn` traits
103
103
= note: try casting the function to a `fn` pointer or wrapping it in a closure
104
104
note: required by a bound in `call_mut`
105
- --> $DIR/fn-traits.rs:18 :25
105
+ --> $DIR/fn-traits.rs:16 :25
106
106
|
107
107
LL | fn call_mut(mut f: impl FnMut()) {
108
108
| ^^^^^^^ required by this bound in `call_mut`
109
109
110
110
error[E0277]: expected a `FnOnce()` closure, found `unsafe fn() {foo_unsafe}`
111
- --> $DIR/fn-traits.rs:40 :15
111
+ --> $DIR/fn-traits.rs:38 :15
112
112
|
113
113
LL | call_once(foo_unsafe);
114
114
| --------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -121,7 +121,7 @@ LL | call_once(foo_unsafe);
121
121
= note: `#[target_feature]` functions do not implement the `Fn` traits
122
122
= note: try casting the function to a `fn` pointer or wrapping it in a closure
123
123
note: required by a bound in `call_once`
124
- --> $DIR/fn-traits.rs:22 :22
124
+ --> $DIR/fn-traits.rs:20 :22
125
125
|
126
126
LL | fn call_once(f: impl FnOnce()) {
127
127
| ^^^^^^^^ required by this bound in `call_once`
0 commit comments