1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
4 LL | f1(|_: (), _: ()| {});
5 | ^^ -------------- found signature of `fn((), ()) -> _`
7 | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
10 --> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
12 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error[E0631]: type mismatch in closure arguments
16 --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
18 LL | f1(|_: (), _: ()| {});
19 | ^^ -------------- found signature of `fn((), ()) -> _`
21 | expected signature of `fn(&(), &()) -> _`
23 note: required by `f1`
24 --> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
26 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 error[E0631]: type mismatch in closure arguments
30 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
32 LL | f2(|_: (), _: ()| {});
33 | ^^ -------------- found signature of `fn((), ()) -> _`
35 | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
37 note: required by `f2`
38 --> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
40 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 error[E0631]: type mismatch in closure arguments
44 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
46 LL | f2(|_: (), _: ()| {});
47 | ^^ -------------- found signature of `fn((), ()) -> _`
49 | expected signature of `fn(&'a (), &()) -> _`
51 note: required by `f2`
52 --> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
54 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57 error[E0631]: type mismatch in closure arguments
58 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
60 LL | f3(|_: (), _: ()| {});
61 | ^^ -------------- found signature of `fn((), ()) -> _`
63 | expected signature of `for<'r> fn(&(), &'r ()) -> _`
65 note: required by `f3`
66 --> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
68 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71 error[E0631]: type mismatch in closure arguments
72 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
74 LL | f3(|_: (), _: ()| {});
75 | ^^ -------------- found signature of `fn((), ()) -> _`
77 | expected signature of `fn(&(), &()) -> _`
79 note: required by `f3`
80 --> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
82 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85 error[E0631]: type mismatch in closure arguments
86 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
88 LL | f4(|_: (), _: ()| {});
89 | ^^ -------------- found signature of `fn((), ()) -> _`
91 | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
93 note: required by `f4`
94 --> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
96 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99 error[E0631]: type mismatch in closure arguments
100 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
102 LL | f4(|_: (), _: ()| {});
103 | ^^ -------------- found signature of `fn((), ()) -> _`
105 | expected signature of `fn(&(), &'r ()) -> _`
107 note: required by `f4`
108 --> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
110 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113 error[E0631]: type mismatch in closure arguments
114 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
116 LL | f5(|_: (), _: ()| {});
117 | ^^ -------------- found signature of `fn((), ()) -> _`
119 | expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
121 note: required by `f5`
122 --> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
124 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
125 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127 error[E0631]: type mismatch in closure arguments
128 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
130 LL | f5(|_: (), _: ()| {});
131 | ^^ -------------- found signature of `fn((), ()) -> _`
133 | expected signature of `fn(&'r (), &'r ()) -> _`
135 note: required by `f5`
136 --> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
138 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141 error[E0631]: type mismatch in closure arguments
142 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
144 LL | g1(|_: (), _: ()| {});
145 | ^^ -------------- found signature of `fn((), ()) -> _`
147 | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _`
149 note: required by `g1`
150 --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
152 LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
153 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155 error[E0631]: type mismatch in closure arguments
156 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
158 LL | g1(|_: (), _: ()| {});
159 | ^^ -------------- found signature of `fn((), ()) -> _`
161 | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
163 note: required by `g1`
164 --> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
166 LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
167 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169 error[E0631]: type mismatch in closure arguments
170 --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
172 LL | g2(|_: (), _: ()| {});
173 | ^^ -------------- found signature of `fn((), ()) -> _`
175 | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
177 note: required by `g2`
178 --> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
180 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183 error[E0631]: type mismatch in closure arguments
184 --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
186 LL | g2(|_: (), _: ()| {});
187 | ^^ -------------- found signature of `fn((), ()) -> _`
189 | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
191 note: required by `g2`
192 --> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
194 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
195 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 error[E0631]: type mismatch in closure arguments
198 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
200 LL | g3(|_: (), _: ()| {});
201 | ^^ -------------- found signature of `fn((), ()) -> _`
203 | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
205 note: required by `g3`
206 --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
208 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 error[E0631]: type mismatch in closure arguments
212 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
214 LL | g3(|_: (), _: ()| {});
215 | ^^ -------------- found signature of `fn((), ()) -> _`
217 | expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
219 note: required by `g3`
220 --> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
222 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
225 error[E0631]: type mismatch in closure arguments
226 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
228 LL | g4(|_: (), _: ()| {});
229 | ^^ -------------- found signature of `fn((), ()) -> _`
231 | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
233 note: required by `g4`
234 --> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
236 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
239 error[E0631]: type mismatch in closure arguments
240 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
242 LL | g4(|_: (), _: ()| {});
243 | ^^ -------------- found signature of `fn((), ()) -> _`
245 | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
247 note: required by `g4`
248 --> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
250 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
251 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
253 error[E0631]: type mismatch in closure arguments
254 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
256 LL | h1(|_: (), _: (), _: (), _: ()| {});
257 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
259 | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
261 note: required by `h1`
262 --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
264 LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
265 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
267 error[E0631]: type mismatch in closure arguments
268 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
270 LL | h1(|_: (), _: (), _: (), _: ()| {});
271 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
273 | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _`
275 note: required by `h1`
276 --> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
278 LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
279 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281 error[E0631]: type mismatch in closure arguments
282 --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
284 LL | h2(|_: (), _: (), _: (), _: ()| {});
285 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
287 | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
289 note: required by `h2`
290 --> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
292 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
295 error[E0631]: type mismatch in closure arguments
296 --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
298 LL | h2(|_: (), _: (), _: (), _: ()| {});
299 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
301 | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
303 note: required by `h2`
304 --> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
306 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
307 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
309 error: aborting due to 22 previous errors