]> git.lizzy.rs Git - rust.git/blob - src/test/ui/anonymous-higher-ranked-lifetime.stderr
Auto merge of #78802 - faern:simplify-socketaddr, r=joshtriplett
[rust.git] / src / test / ui / anonymous-higher-ranked-lifetime.stderr
1 error[E0631]: type mismatch in closure arguments
2   --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
3    |
4 LL |     f1(|_: (), _: ()| {});
5    |     ^^ -------------- found signature defined here
6    |     |
7    |     expected due to this
8    |
9    = note: expected closure signature `for<'r, 's> fn(&'r (), &'s ()) -> _`
10               found closure signature `fn((), ()) -> _`
11 note: required by a bound in `f1`
12   --> $DIR/anonymous-higher-ranked-lifetime.rs:16:25
13    |
14 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
15    |                         ^^^^^^^^^^^^ required by this bound in `f1`
16
17 error[E0631]: type mismatch in closure arguments
18   --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
19    |
20 LL |     f2(|_: (), _: ()| {});
21    |     ^^ -------------- found signature defined here
22    |     |
23    |     expected due to this
24    |
25    = note: expected closure signature `for<'a, 'r> fn(&'a (), &'r ()) -> _`
26               found closure signature `fn((), ()) -> _`
27 note: required by a bound in `f2`
28   --> $DIR/anonymous-higher-ranked-lifetime.rs:17:25
29    |
30 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
31    |                         ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
32
33 error[E0631]: type mismatch in closure arguments
34   --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
35    |
36 LL |     f3(|_: (), _: ()| {});
37    |     ^^ -------------- found signature defined here
38    |     |
39    |     expected due to this
40    |
41    = note: expected closure signature `for<'r> fn(&(), &'r ()) -> _`
42               found closure signature `fn((), ()) -> _`
43 note: required by a bound in `f3`
44   --> $DIR/anonymous-higher-ranked-lifetime.rs:18:29
45    |
46 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
47    |                             ^^^^^^^^^^^^^^^ required by this bound in `f3`
48
49 error[E0631]: type mismatch in closure arguments
50   --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
51    |
52 LL |     f4(|_: (), _: ()| {});
53    |     ^^ -------------- found signature defined here
54    |     |
55    |     expected due to this
56    |
57    = note: expected closure signature `for<'r, 's> fn(&'s (), &'r ()) -> _`
58               found closure signature `fn((), ()) -> _`
59 note: required by a bound in `f4`
60   --> $DIR/anonymous-higher-ranked-lifetime.rs:19:25
61    |
62 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
63    |                         ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
64
65 error[E0631]: type mismatch in closure arguments
66   --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
67    |
68 LL |     f5(|_: (), _: ()| {});
69    |     ^^ -------------- found signature defined here
70    |     |
71    |     expected due to this
72    |
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
77    |
78 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
79    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
80
81 error[E0631]: type mismatch in closure arguments
82   --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
83    |
84 LL |     g1(|_: (), _: ()| {});
85    |     ^^ -------------- found signature defined here
86    |     |
87    |     expected due to this
88    |
89    = note: expected closure signature `for<'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
90               found closure signature `fn((), ()) -> _`
91 note: required by a bound in `g1`
92   --> $DIR/anonymous-higher-ranked-lifetime.rs:23:25
93    |
94 LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
95    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
96
97 error[E0631]: type mismatch in closure arguments
98   --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
99    |
100 LL |     g2(|_: (), _: ()| {});
101    |     ^^ -------------- found signature defined here
102    |     |
103    |     expected due to this
104    |
105    = note: expected closure signature `for<'r> fn(&'r (), for<'r> fn(&'r ())) -> _`
106               found closure signature `fn((), ()) -> _`
107 note: required by a bound in `g2`
108   --> $DIR/anonymous-higher-ranked-lifetime.rs:24:25
109    |
110 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
111    |                         ^^^^^^^^^^^^^^^^ required by this bound in `g2`
112
113 error[E0631]: type mismatch in closure arguments
114   --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
115    |
116 LL |     g3(|_: (), _: ()| {});
117    |     ^^ -------------- found signature defined here
118    |     |
119    |     expected due to this
120    |
121    = note: expected closure signature `for<'s> fn(&'s (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
122               found closure signature `fn((), ()) -> _`
123 note: required by a bound in `g3`
124   --> $DIR/anonymous-higher-ranked-lifetime.rs:25:25
125    |
126 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
127    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
128
129 error[E0631]: type mismatch in closure arguments
130   --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
131    |
132 LL |     g4(|_: (), _: ()| {});
133    |     ^^ -------------- found signature defined here
134    |     |
135    |     expected due to this
136    |
137    = note: expected closure signature `for<'s> fn(&'s (), 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
141    |
142 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
143    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
144
145 error[E0631]: type mismatch in closure arguments
146   --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
147    |
148 LL |     h1(|_: (), _: (), _: (), _: ()| {});
149    |     ^^ ---------------------------- found signature defined here
150    |     |
151    |     expected due to this
152    |
153    = note: expected closure signature `for<'r, 's> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'s (), for<'r, 's> fn(&'r (), &'s ())) -> _`
154               found closure signature `fn((), (), (), ()) -> _`
155 note: required by a bound in `h1`
156   --> $DIR/anonymous-higher-ranked-lifetime.rs:29:25
157    |
158 LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
159    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
160
161 error[E0631]: type mismatch in closure arguments
162   --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
163    |
164 LL |     h2(|_: (), _: (), _: (), _: ()| {});
165    |     ^^ ---------------------------- found signature defined here
166    |     |
167    |     expected due to this
168    |
169    = note: expected closure signature `for<'t0, 'r> fn(&'r (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
170               found closure signature `fn((), (), (), ()) -> _`
171 note: required by a bound in `h2`
172   --> $DIR/anonymous-higher-ranked-lifetime.rs:30:25
173    |
174 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
175    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
176
177 error: aborting due to 11 previous errors
178
179 For more information about this error, try `rustc --explain E0631`.