@@ -4,128 +4,106 @@ error[E0308]: mismatched types
4
4
LL | thing(f);
5
5
| ^^^^^^^^ one type is more general than the other
6
6
|
7
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>`
8
- found trait `FnOnce<(&u32, &u32)>`
7
+ = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32 )>`
8
+ found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>`
9
9
note: this closure does not fulfill the lifetime requirements
10
10
--> $DIR/issue-105675.rs:4:13
11
11
|
12
- LL | let f = |_, _ | ();
13
- | ^^^^^^
12
+ LL | let f = | _ , y: &u32 , z | ();
13
+ | ^^^^^^^^^^^^^^^^^^^
14
14
note: the lifetime requirement is introduced here
15
15
--> $DIR/issue-105675.rs:1:18
16
16
|
17
- LL | fn thing(x: impl FnOnce(&u32, &u32)) {}
18
- | ^^^^^^^^^^^^^^^^^^
17
+ LL | fn thing(x: impl FnOnce(&u32, &u32, u32 )) {}
18
+ | ^^^^^^^^^^^^^^^^^^^^^^^
19
19
help: consider specifying the type of the closure parameters
20
20
|
21
- LL | let f = |_: &_, _ : &_ | ();
22
- | ~~~~~~~~~~~~~~
21
+ LL | let f = |_: &_, y : &u32, z | ();
22
+ | ~~~~~~~~~~~~~~~~~~~
23
23
24
24
error[E0308]: mismatched types
25
25
--> $DIR/issue-105675.rs:5:5
26
26
|
27
27
LL | thing(f);
28
28
| ^^^^^^^^ one type is more general than the other
29
29
|
30
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>`
31
- found trait `FnOnce<(&u32, &u32)>`
30
+ = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32 )>`
31
+ found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>`
32
32
note: this closure does not fulfill the lifetime requirements
33
33
--> $DIR/issue-105675.rs:4:13
34
34
|
35
- LL | let f = |_, _ | ();
36
- | ^^^^^^
35
+ LL | let f = | _ , y: &u32 , z | ();
36
+ | ^^^^^^^^^^^^^^^^^^^
37
37
note: the lifetime requirement is introduced here
38
38
--> $DIR/issue-105675.rs:1:18
39
39
|
40
- LL | fn thing(x: impl FnOnce(&u32, &u32)) {}
41
- | ^^^^^^^^^^^^^^^^^^
42
- help: consider specifying the type of the closure parameters
43
- |
44
- LL | let f = |_: &_, _: &_| ();
45
- | ~~~~~~~~~~~~~~
46
-
47
- error: implementation of `FnOnce` is not general enough
48
- --> $DIR/issue-105675.rs:5:5
49
- |
50
- LL | thing(f);
51
- | ^^^^^^^^ implementation of `FnOnce` is not general enough
52
- |
53
- = note: closure with signature `fn(&'2 u32, &u32)` must implement `FnOnce<(&'1 u32, &u32)>`, for any lifetime `'1`...
54
- = note: ...but it actually implements `FnOnce<(&'2 u32, &u32)>`, for some specific lifetime `'2`
55
-
56
- error: implementation of `FnOnce` is not general enough
57
- --> $DIR/issue-105675.rs:5:5
58
- |
59
- LL | thing(f);
60
- | ^^^^^^^^ implementation of `FnOnce` is not general enough
61
- |
62
- = note: closure with signature `fn(&u32, &'2 u32)` must implement `FnOnce<(&u32, &'1 u32)>`, for any lifetime `'1`...
63
- = note: ...but it actually implements `FnOnce<(&u32, &'2 u32)>`, for some specific lifetime `'2`
40
+ LL | fn thing(x: impl FnOnce(&u32, &u32, u32)) {}
41
+ | ^^^^^^^^^^^^^^^^^^^^^^^
64
42
65
43
error[E0308]: mismatched types
66
- --> $DIR/issue-105675.rs:11 :5
44
+ --> $DIR/issue-105675.rs:9 :5
67
45
|
68
46
LL | thing(f);
69
47
| ^^^^^^^^ one type is more general than the other
70
48
|
71
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>`
72
- found trait `FnOnce<(&u32, &u32)>`
49
+ = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32 )>`
50
+ found trait `FnOnce<(&u32, &u32, u32 )>`
73
51
note: this closure does not fulfill the lifetime requirements
74
- --> $DIR/issue-105675.rs:10 :13
52
+ --> $DIR/issue-105675.rs:8 :13
75
53
|
76
- LL | let f = |x, y| ();
77
- | ^^^^^^
54
+ LL | let f = | x, y: _ , z: u32 | ();
55
+ | ^^^^^^^^^^^^^^^^^^^^^
78
56
note: the lifetime requirement is introduced here
79
57
--> $DIR/issue-105675.rs:1:18
80
58
|
81
- LL | fn thing(x: impl FnOnce(&u32, &u32)) {}
82
- | ^^^^^^^^^^^^^^^^^^
59
+ LL | fn thing(x: impl FnOnce(&u32, &u32, u32 )) {}
60
+ | ^^^^^^^^^^^^^^^^^^^^^^^
83
61
help: consider specifying the type of the closure parameters
84
62
|
85
- LL | let f = |x: &_, y: &_| ();
86
- | ~~~~~~~~~~~~~~
63
+ LL | let f = |x: &_, y: &_, z: u32 | ();
64
+ | ~~~~~~~~~~~~~~~~~~~~~~
87
65
88
66
error[E0308]: mismatched types
89
- --> $DIR/issue-105675.rs:11 :5
67
+ --> $DIR/issue-105675.rs:9 :5
90
68
|
91
69
LL | thing(f);
92
70
| ^^^^^^^^ one type is more general than the other
93
71
|
94
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>`
95
- found trait `FnOnce<(&u32, &u32)>`
72
+ = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32 )>`
73
+ found trait `FnOnce<(&u32, &u32, u32 )>`
96
74
note: this closure does not fulfill the lifetime requirements
97
- --> $DIR/issue-105675.rs:10 :13
75
+ --> $DIR/issue-105675.rs:8 :13
98
76
|
99
- LL | let f = |x, y| ();
100
- | ^^^^^^
77
+ LL | let f = | x, y: _ , z: u32 | ();
78
+ | ^^^^^^^^^^^^^^^^^^^^^
101
79
note: the lifetime requirement is introduced here
102
80
--> $DIR/issue-105675.rs:1:18
103
81
|
104
- LL | fn thing(x: impl FnOnce(&u32, &u32)) {}
105
- | ^^^^^^^^^^^^^^^^^^
82
+ LL | fn thing(x: impl FnOnce(&u32, &u32, u32 )) {}
83
+ | ^^^^^^^^^^^^^^^^^^^^^^^
106
84
help: consider specifying the type of the closure parameters
107
85
|
108
- LL | let f = |x: &_, y: &_| ();
109
- | ~~~~~~~~~~~~~~
86
+ LL | let f = |x: &_, y: &_, z: u32 | ();
87
+ | ~~~~~~~~~~~~~~~~~~~~~~
110
88
111
89
error: implementation of `FnOnce` is not general enough
112
- --> $DIR/issue-105675.rs:11 :5
90
+ --> $DIR/issue-105675.rs:9 :5
113
91
|
114
92
LL | thing(f);
115
93
| ^^^^^^^^ implementation of `FnOnce` is not general enough
116
94
|
117
- = note: closure with signature `fn(&'2 u32, &u32)` must implement `FnOnce<(&'1 u32, &u32)>`, for any lifetime `'1`...
118
- = note: ...but it actually implements `FnOnce<(&'2 u32, &u32)>`, for some specific lifetime `'2`
95
+ = note: closure with signature `fn(&'2 u32, &u32, u32 )` must implement `FnOnce<(&'1 u32, &u32, u32)>`, for any lifetime `'1`...
96
+ = note: ...but it actually implements `FnOnce<(&'2 u32, &u32, u32 )>`, for some specific lifetime `'2`
119
97
120
98
error: implementation of `FnOnce` is not general enough
121
- --> $DIR/issue-105675.rs:11 :5
99
+ --> $DIR/issue-105675.rs:9 :5
122
100
|
123
101
LL | thing(f);
124
102
| ^^^^^^^^ implementation of `FnOnce` is not general enough
125
103
|
126
- = note: closure with signature `fn(&u32, &'2 u32)` must implement `FnOnce<(&u32, &'1 u32)>`, for any lifetime `'1`...
127
- = note: ...but it actually implements `FnOnce<(&u32, &'2 u32)>`, for some specific lifetime `'2`
104
+ = note: closure with signature `fn(&u32, &'2 u32, u32 )` must implement `FnOnce<(&u32, &'1 u32, u32)>`, for any lifetime `'1`...
105
+ = note: ...but it actually implements `FnOnce<(&u32, &'2 u32, u32 )>`, for some specific lifetime `'2`
128
106
129
- error: aborting due to 8 previous errors
107
+ error: aborting due to 6 previous errors
130
108
131
109
For more information about this error, try `rustc --explain E0308`.
0 commit comments