1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
4 LL | f1(|_: (), _: ()| {});
5 | ^^ -------------- found signature defined here
9 = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
10 found closure signature `fn((), ()) -> _`
11 note: required by a bound in `f1`
12 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:25
14 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
15 | ^^^^^^^^^^^^ required by this bound in `f1`
17 error[E0631]: type mismatch in closure arguments
18 --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
20 LL | f2(|_: (), _: ()| {});
21 | ^^ -------------- found signature defined here
23 | expected due to this
25 = note: expected closure signature `for<'a, 'b> fn(&'a (), &'b ()) -> _`
26 found closure signature `fn((), ()) -> _`
27 note: required by a bound in `f2`
28 --> $DIR/anonymous-higher-ranked-lifetime.rs:17:25
30 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
31 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
33 error[E0631]: type mismatch in closure arguments
34 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
36 LL | f3(|_: (), _: ()| {});
37 | ^^ -------------- found signature defined here
39 | expected due to this
41 = note: expected closure signature `for<'a> fn(&(), &'a ()) -> _`
42 found closure signature `fn((), ()) -> _`
43 note: required by a bound in `f3`
44 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:29
46 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
47 | ^^^^^^^^^^^^^^^ required by this bound in `f3`
49 error[E0631]: type mismatch in closure arguments
50 --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
52 LL | f4(|_: (), _: ()| {});
53 | ^^ -------------- found signature defined here
55 | expected due to this
57 = note: expected closure signature `for<'r, 'a> fn(&'a (), &'r ()) -> _`
58 found closure signature `fn((), ()) -> _`
59 note: required by a bound in `f4`
60 --> $DIR/anonymous-higher-ranked-lifetime.rs:19:25
62 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
63 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
65 error[E0631]: type mismatch in closure arguments
66 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
68 LL | f5(|_: (), _: ()| {});
69 | ^^ -------------- found signature defined here
71 | expected due to this
73 = note: expected closure signature `for<'r> fn(&'r (), &'r ()) -> _`
74 found closure signature `fn((), ()) -> _`
75 note: required by a bound in `f5`
76 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:25
78 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
81 error[E0631]: type mismatch in closure arguments
82 --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
84 LL | g1(|_: (), _: ()| {});
85 | ^^ -------------- found signature defined here
87 | expected due to this
89 = note: expected closure signature `for<'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
90 found closure signature `fn((), ()) -> _`
91 note: required by a bound in `g1`
92 --> $DIR/anonymous-higher-ranked-lifetime.rs:23:25
94 LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
95 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
97 error[E0631]: type mismatch in closure arguments
98 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
100 LL | g2(|_: (), _: ()| {});
101 | ^^ -------------- found signature defined here
103 | expected due to this
105 = note: expected closure signature `for<'a> fn(&'a (), for<'a> fn(&'a ())) -> _`
106 found closure signature `fn((), ()) -> _`
107 note: required by a bound in `g2`
108 --> $DIR/anonymous-higher-ranked-lifetime.rs:24:25
110 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
111 | ^^^^^^^^^^^^^^^^ required by this bound in `g2`
113 error[E0631]: type mismatch in closure arguments
114 --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
116 LL | g3(|_: (), _: ()| {});
117 | ^^ -------------- found signature defined here
119 | expected due to this
121 = note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>) -> _`
122 found closure signature `fn((), ()) -> _`
123 note: required by a bound in `g3`
124 --> $DIR/anonymous-higher-ranked-lifetime.rs:25:25
126 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
129 error[E0631]: type mismatch in closure arguments
130 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
132 LL | g4(|_: (), _: ()| {});
133 | ^^ -------------- found signature defined here
135 | expected due to this
137 = note: expected closure signature `for<'a> fn(&'a (), for<'r> fn(&'r ())) -> _`
138 found closure signature `fn((), ()) -> _`
139 note: required by a bound in `g4`
140 --> $DIR/anonymous-higher-ranked-lifetime.rs:26:25
142 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
145 error[E0631]: type mismatch in closure arguments
146 --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
148 LL | h1(|_: (), _: (), _: (), _: ()| {});
149 | ^^ ---------------------------- found signature defined here
151 | expected due to this
153 = note: expected closure signature `for<'a, 'b> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'b (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
154 found closure signature `fn((), (), (), ()) -> _`
155 note: required by a bound in `h1`
156 --> $DIR/anonymous-higher-ranked-lifetime.rs:29:25
158 LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
161 error[E0631]: type mismatch in closure arguments
162 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
164 LL | h2(|_: (), _: (), _: (), _: ()| {});
165 | ^^ ---------------------------- found signature defined here
167 | expected due to this
169 = note: expected closure signature `for<'t0, 'a> fn(&'a (), Box<(dyn for<'a> Fn(&'a ()) + 'static)>, &'t0 (), for<'a, 'b> fn(&'a (), &'b ())) -> _`
170 found closure signature `fn((), (), (), ()) -> _`
171 note: required by a bound in `h2`
172 --> $DIR/anonymous-higher-ranked-lifetime.rs:30:25
174 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
175 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
177 error: aborting due to 11 previous errors
179 For more information about this error, try `rustc --explain E0631`.