1
1
error[E0277]: expected a `Fn()` closure, found `fn() {foo}`
2
- --> $DIR/fn-traits.rs:24 :10
2
+ --> $DIR/fn-traits.rs:22 :10
3
3
|
4
4
LL | call(foo);
5
5
| ---- ^^^ expected an `Fn()` closure, found `fn() {foo}`
@@ -10,13 +10,13 @@ LL | call(foo);
10
10
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
11
11
= note: `#[target_feature]` functions do not implement the `Fn` traits
12
12
note: required by a bound in `call`
13
- --> $DIR/fn-traits.rs:11 :17
13
+ --> $DIR/fn-traits.rs:9 :17
14
14
|
15
15
LL | fn call(f: impl Fn()) {
16
16
| ^^^^ required by this bound in `call`
17
17
18
18
error[E0277]: expected a `FnMut()` closure, found `fn() {foo}`
19
- --> $DIR/fn-traits.rs:25 :14
19
+ --> $DIR/fn-traits.rs:23 :14
20
20
|
21
21
LL | call_mut(foo);
22
22
| -------- ^^^ expected an `FnMut()` closure, found `fn() {foo}`
@@ -27,13 +27,13 @@ LL | call_mut(foo);
27
27
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
28
28
= note: `#[target_feature]` functions do not implement the `Fn` traits
29
29
note: required by a bound in `call_mut`
30
- --> $DIR/fn-traits.rs:15 :25
30
+ --> $DIR/fn-traits.rs:13 :25
31
31
|
32
32
LL | fn call_mut(mut f: impl FnMut()) {
33
33
| ^^^^^^^ required by this bound in `call_mut`
34
34
35
35
error[E0277]: expected a `FnOnce()` closure, found `fn() {foo}`
36
- --> $DIR/fn-traits.rs:26 :15
36
+ --> $DIR/fn-traits.rs:24 :15
37
37
|
38
38
LL | call_once(foo);
39
39
| --------- ^^^ expected an `FnOnce()` closure, found `fn() {foo}`
@@ -44,13 +44,13 @@ LL | call_once(foo);
44
44
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
45
45
= note: `#[target_feature]` functions do not implement the `Fn` traits
46
46
note: required by a bound in `call_once`
47
- --> $DIR/fn-traits.rs:19 :22
47
+ --> $DIR/fn-traits.rs:17 :22
48
48
|
49
49
LL | fn call_once(f: impl FnOnce()) {
50
50
| ^^^^^^^^ required by this bound in `call_once`
51
51
52
52
error[E0277]: expected a `Fn()` closure, found `unsafe fn() {foo_unsafe}`
53
- --> $DIR/fn-traits.rs:28 :10
53
+ --> $DIR/fn-traits.rs:26 :10
54
54
|
55
55
LL | call(foo_unsafe);
56
56
| ---- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -62,13 +62,13 @@ LL | call(foo_unsafe);
62
62
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
63
63
= note: `#[target_feature]` functions do not implement the `Fn` traits
64
64
note: required by a bound in `call`
65
- --> $DIR/fn-traits.rs:11 :17
65
+ --> $DIR/fn-traits.rs:9 :17
66
66
|
67
67
LL | fn call(f: impl Fn()) {
68
68
| ^^^^ required by this bound in `call`
69
69
70
70
error[E0277]: expected a `FnMut()` closure, found `unsafe fn() {foo_unsafe}`
71
- --> $DIR/fn-traits.rs:30 :14
71
+ --> $DIR/fn-traits.rs:28 :14
72
72
|
73
73
LL | call_mut(foo_unsafe);
74
74
| -------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -80,13 +80,13 @@ LL | call_mut(foo_unsafe);
80
80
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
81
81
= note: `#[target_feature]` functions do not implement the `Fn` traits
82
82
note: required by a bound in `call_mut`
83
- --> $DIR/fn-traits.rs:15 :25
83
+ --> $DIR/fn-traits.rs:13 :25
84
84
|
85
85
LL | fn call_mut(mut f: impl FnMut()) {
86
86
| ^^^^^^^ required by this bound in `call_mut`
87
87
88
88
error[E0277]: expected a `FnOnce()` closure, found `unsafe fn() {foo_unsafe}`
89
- --> $DIR/fn-traits.rs:32 :15
89
+ --> $DIR/fn-traits.rs:30 :15
90
90
|
91
91
LL | call_once(foo_unsafe);
92
92
| --------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -98,7 +98,7 @@ LL | call_once(foo_unsafe);
98
98
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
99
99
= note: `#[target_feature]` functions do not implement the `Fn` traits
100
100
note: required by a bound in `call_once`
101
- --> $DIR/fn-traits.rs:19 :22
101
+ --> $DIR/fn-traits.rs:17 :22
102
102
|
103
103
LL | fn call_once(f: impl FnOnce()) {
104
104
| ^^^^^^^^ required by this bound in `call_once`
0 commit comments