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