11error[E0631]: type mismatch in closure arguments
2- --> $DIR/anonymous-higher-ranked-lifetime.rs:2:8
2+ --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
33 |
44LL | f1(|_: (), _: ()| {});
5- | -- --------------^^^
6- | | |
7- | | expected due to this
8- | | found signature defined here
9- | required by a bound introduced by this call
5+ | ^^ -------------- found signature defined here
6+ | |
7+ | expected due to this
108 |
119 = note: expected closure signature `for<'r, 's> fn(&'r (), &'s ()) -> _`
1210 found closure signature `fn((), ()) -> _`
@@ -17,14 +15,12 @@ LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
1715 | ^^^^^^^^^^^^ required by this bound in `f1`
1816
1917error[E0631]: type mismatch in closure arguments
20- --> $DIR/anonymous-higher-ranked-lifetime.rs:3:8
18+ --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
2119 |
2220LL | f2(|_: (), _: ()| {});
23- | -- --------------^^^
24- | | |
25- | | expected due to this
26- | | found signature defined here
27- | required by a bound introduced by this call
21+ | ^^ -------------- found signature defined here
22+ | |
23+ | expected due to this
2824 |
2925 = note: expected closure signature `for<'a, 'r> fn(&'a (), &'r ()) -> _`
3026 found closure signature `fn((), ()) -> _`
@@ -35,14 +31,12 @@ LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
3531 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
3632
3733error[E0631]: type mismatch in closure arguments
38- --> $DIR/anonymous-higher-ranked-lifetime.rs:4:8
34+ --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
3935 |
4036LL | f3(|_: (), _: ()| {});
41- | -- --------------^^^
42- | | |
43- | | expected due to this
44- | | found signature defined here
45- | required by a bound introduced by this call
37+ | ^^ -------------- found signature defined here
38+ | |
39+ | expected due to this
4640 |
4741 = note: expected closure signature `for<'r> fn(&(), &'r ()) -> _`
4842 found closure signature `fn((), ()) -> _`
@@ -53,14 +47,12 @@ LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
5347 | ^^^^^^^^^^^^^^^ required by this bound in `f3`
5448
5549error[E0631]: type mismatch in closure arguments
56- --> $DIR/anonymous-higher-ranked-lifetime.rs:5:8
50+ --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
5751 |
5852LL | f4(|_: (), _: ()| {});
59- | -- --------------^^^
60- | | |
61- | | expected due to this
62- | | found signature defined here
63- | required by a bound introduced by this call
53+ | ^^ -------------- found signature defined here
54+ | |
55+ | expected due to this
6456 |
6557 = note: expected closure signature `for<'r, 's> fn(&'s (), &'r ()) -> _`
6658 found closure signature `fn((), ()) -> _`
@@ -71,14 +63,12 @@ LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
7163 | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
7264
7365error[E0631]: type mismatch in closure arguments
74- --> $DIR/anonymous-higher-ranked-lifetime.rs:6:8
66+ --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
7567 |
7668LL | f5(|_: (), _: ()| {});
77- | -- --------------^^^
78- | | |
79- | | expected due to this
80- | | found signature defined here
81- | required by a bound introduced by this call
69+ | ^^ -------------- found signature defined here
70+ | |
71+ | expected due to this
8272 |
8373 = note: expected closure signature `for<'r> fn(&'r (), &'r ()) -> _`
8474 found closure signature `fn((), ()) -> _`
@@ -89,14 +79,12 @@ LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
8979 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
9080
9181error[E0631]: type mismatch in closure arguments
92- --> $DIR/anonymous-higher-ranked-lifetime.rs:7:8
82+ --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
9383 |
9484LL | g1(|_: (), _: ()| {});
95- | -- --------------^^^
96- | | |
97- | | expected due to this
98- | | found signature defined here
99- | required by a bound introduced by this call
85+ | ^^ -------------- found signature defined here
86+ | |
87+ | expected due to this
10088 |
10189 = note: expected closure signature `for<'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
10290 found closure signature `fn((), ()) -> _`
@@ -107,14 +95,12 @@ LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
10795 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
10896
10997error[E0631]: type mismatch in closure arguments
110- --> $DIR/anonymous-higher-ranked-lifetime.rs:8:8
98+ --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
11199 |
112100LL | g2(|_: (), _: ()| {});
113- | -- --------------^^^
114- | | |
115- | | expected due to this
116- | | found signature defined here
117- | required by a bound introduced by this call
101+ | ^^ -------------- found signature defined here
102+ | |
103+ | expected due to this
118104 |
119105 = note: expected closure signature `for<'r> fn(&'r (), for<'r> fn(&'r ())) -> _`
120106 found closure signature `fn((), ()) -> _`
@@ -125,14 +111,12 @@ LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
125111 | ^^^^^^^^^^^^^^^^ required by this bound in `g2`
126112
127113error[E0631]: type mismatch in closure arguments
128- --> $DIR/anonymous-higher-ranked-lifetime.rs:9:8
114+ --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
129115 |
130116LL | g3(|_: (), _: ()| {});
131- | -- --------------^^^
132- | | |
133- | | expected due to this
134- | | found signature defined here
135- | required by a bound introduced by this call
117+ | ^^ -------------- found signature defined here
118+ | |
119+ | expected due to this
136120 |
137121 = note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
138122 found closure signature `fn((), ()) -> _`
@@ -143,14 +127,12 @@ LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
143127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
144128
145129error[E0631]: type mismatch in closure arguments
146- --> $DIR/anonymous-higher-ranked-lifetime.rs:10:8
130+ --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
147131 |
148132LL | g4(|_: (), _: ()| {});
149- | -- --------------^^^
150- | | |
151- | | expected due to this
152- | | found signature defined here
153- | required by a bound introduced by this call
133+ | ^^ -------------- found signature defined here
134+ | |
135+ | expected due to this
154136 |
155137 = note: expected closure signature `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
156138 found closure signature `fn((), ()) -> _`
@@ -161,14 +143,12 @@ LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
161143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
162144
163145error[E0631]: type mismatch in closure arguments
164- --> $DIR/anonymous-higher-ranked-lifetime.rs:11:8
146+ --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
165147 |
166148LL | h1(|_: (), _: (), _: (), _: ()| {});
167- | -- ----------------------------^^^
168- | | |
169- | | expected due to this
170- | | found signature defined here
171- | required by a bound introduced by this call
149+ | ^^ ---------------------------- found signature defined here
150+ | |
151+ | expected due to this
172152 |
173153 = note: expected closure signature `for<'r, 's> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'s (), for<'r, 's> fn(&'r (), &'s ())) -> _`
174154 found closure signature `fn((), (), (), ()) -> _`
@@ -179,14 +159,12 @@ LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
179159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
180160
181161error[E0631]: type mismatch in closure arguments
182- --> $DIR/anonymous-higher-ranked-lifetime.rs:12:8
162+ --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
183163 |
184164LL | h2(|_: (), _: (), _: (), _: ()| {});
185- | -- ----------------------------^^^
186- | | |
187- | | expected due to this
188- | | found signature defined here
189- | required by a bound introduced by this call
165+ | ^^ ---------------------------- found signature defined here
166+ | |
167+ | expected due to this
190168 |
191169 = note: expected closure signature `for<'t0, 'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
192170 found closure signature `fn((), (), (), ()) -> _`
0 commit comments