@@ -13,6 +13,14 @@ note: required by a bound in `f1`
13
13
|
14
14
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
15
15
| ^^^^^^^^^^^^ required by this bound in `f1`
16
+ help: hint: consider borrowing here:
17
+ |
18
+ LL | f1(|_: &(), _: ()| {});
19
+ | ~~~
20
+ help: hint: consider borrowing here:
21
+ |
22
+ LL | f1(|_: (), _: &()| {});
23
+ | ~~~
16
24
17
25
error[E0631]: type mismatch in closure arguments
18
26
--> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
@@ -29,6 +37,14 @@ note: required by a bound in `f2`
29
37
|
30
38
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
31
39
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
40
+ help: hint: consider borrowing here:
41
+ |
42
+ LL | f2(|_: &'a (), _: ()| {});
43
+ | ~~~~~~
44
+ help: hint: consider borrowing here:
45
+ |
46
+ LL | f2(|_: (), _: &()| {});
47
+ | ~~~
32
48
33
49
error[E0631]: type mismatch in closure arguments
34
50
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
@@ -45,6 +61,14 @@ note: required by a bound in `f3`
45
61
|
46
62
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
47
63
| ^^^^^^^^^^^^^^^ required by this bound in `f3`
64
+ help: hint: consider borrowing here:
65
+ |
66
+ LL | f3(|_: &(), _: ()| {});
67
+ | ~~~
68
+ help: hint: consider borrowing here:
69
+ |
70
+ LL | f3(|_: (), _: &()| {});
71
+ | ~~~
48
72
49
73
error[E0631]: type mismatch in closure arguments
50
74
--> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
@@ -61,6 +85,14 @@ note: required by a bound in `f4`
61
85
|
62
86
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
63
87
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
88
+ help: hint: consider borrowing here:
89
+ |
90
+ LL | f4(|_: &(), _: ()| {});
91
+ | ~~~
92
+ help: hint: consider borrowing here:
93
+ |
94
+ LL | f4(|_: (), _: &'r ()| {});
95
+ | ~~~~~~
64
96
65
97
error[E0631]: type mismatch in closure arguments
66
98
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
@@ -77,6 +109,14 @@ note: required by a bound in `f5`
77
109
|
78
110
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
79
111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
112
+ help: hint: consider borrowing here:
113
+ |
114
+ LL | f5(|_: &'r (), _: ()| {});
115
+ | ~~~~~~
116
+ help: hint: consider borrowing here:
117
+ |
118
+ LL | f5(|_: (), _: &'r ()| {});
119
+ | ~~~~~~
80
120
81
121
error[E0631]: type mismatch in closure arguments
82
122
--> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
@@ -93,6 +133,10 @@ note: required by a bound in `g1`
93
133
|
94
134
LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
95
135
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
136
+ help: hint: consider borrowing here:
137
+ |
138
+ LL | g1(|_: &(), _: ()| {});
139
+ | ~~~
96
140
97
141
error[E0631]: type mismatch in closure arguments
98
142
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
@@ -109,6 +153,10 @@ note: required by a bound in `g2`
109
153
|
110
154
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
111
155
| ^^^^^^^^^^^^^^^^ required by this bound in `g2`
156
+ help: hint: consider borrowing here:
157
+ |
158
+ LL | g2(|_: &(), _: ()| {});
159
+ | ~~~
112
160
113
161
error[E0631]: type mismatch in closure arguments
114
162
--> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
@@ -125,6 +173,10 @@ note: required by a bound in `g3`
125
173
|
126
174
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
127
175
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
176
+ help: hint: consider borrowing here:
177
+ |
178
+ LL | g3(|_: &'s (), _: ()| {});
179
+ | ~~~~~~
128
180
129
181
error[E0631]: type mismatch in closure arguments
130
182
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
@@ -141,6 +193,10 @@ note: required by a bound in `g4`
141
193
|
142
194
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
143
195
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
196
+ help: hint: consider borrowing here:
197
+ |
198
+ LL | g4(|_: &(), _: ()| {});
199
+ | ~~~
144
200
145
201
error[E0631]: type mismatch in closure arguments
146
202
--> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
@@ -157,6 +213,14 @@ note: required by a bound in `h1`
157
213
|
158
214
LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
159
215
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
216
+ help: hint: consider borrowing here:
217
+ |
218
+ LL | h1(|_: &(), _: (), _: (), _: ()| {});
219
+ | ~~~
220
+ help: hint: consider borrowing here:
221
+ |
222
+ LL | h1(|_: (), _: (), _: &(), _: ()| {});
223
+ | ~~~
160
224
161
225
error[E0631]: type mismatch in closure arguments
162
226
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
@@ -173,6 +237,14 @@ note: required by a bound in `h2`
173
237
|
174
238
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
175
239
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
240
+ help: hint: consider borrowing here:
241
+ |
242
+ LL | h2(|_: &(), _: (), _: (), _: ()| {});
243
+ | ~~~
244
+ help: hint: consider borrowing here:
245
+ |
246
+ LL | h2(|_: (), _: (), _: &'t0 (), _: ()| {});
247
+ | ~~~~~~~
176
248
177
249
error: aborting due to 11 previous errors
178
250
0 commit comments