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 :21
30
+ --> $DIR/fn-traits.rs:13 :21
31
31
|
32
32
LL | fn call_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 */ }`
@@ -61,13 +61,13 @@ LL | call(foo_unsafe);
61
61
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
62
62
= note: `#[target_feature]` functions do not implement the `Fn` traits
63
63
note: required by a bound in `call`
64
- --> $DIR/fn-traits.rs:11 :17
64
+ --> $DIR/fn-traits.rs:9 :17
65
65
|
66
66
LL | fn call(f: impl Fn()) {
67
67
| ^^^^ required by this bound in `call`
68
68
69
69
error[E0277]: expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
70
- --> $DIR/fn-traits.rs:30 :14
70
+ --> $DIR/fn-traits.rs:28 :14
71
71
|
72
72
LL | call_mut(foo_unsafe);
73
73
| -------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -78,13 +78,13 @@ LL | call_mut(foo_unsafe);
78
78
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
79
79
= note: `#[target_feature]` functions do not implement the `Fn` traits
80
80
note: required by a bound in `call_mut`
81
- --> $DIR/fn-traits.rs:15 :21
81
+ --> $DIR/fn-traits.rs:13 :21
82
82
|
83
83
LL | fn call_mut(f: impl FnMut()) {
84
84
| ^^^^^^^ required by this bound in `call_mut`
85
85
86
86
error[E0277]: expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
87
- --> $DIR/fn-traits.rs:32 :15
87
+ --> $DIR/fn-traits.rs:30 :15
88
88
|
89
89
LL | call_once(foo_unsafe);
90
90
| --------- ^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
@@ -95,7 +95,7 @@ LL | call_once(foo_unsafe);
95
95
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
96
96
= note: `#[target_feature]` functions do not implement the `Fn` traits
97
97
note: required by a bound in `call_once`
98
- --> $DIR/fn-traits.rs:19 :22
98
+ --> $DIR/fn-traits.rs:17 :22
99
99
|
100
100
LL | fn call_once(f: impl FnOnce()) {
101
101
| ^^^^^^^^ required by this bound in `call_once`
0 commit comments