]> git.proxmox.com Git - rustc.git/blob - src/test/ui/anonymous-higher-ranked-lifetime.stderr
New upstream version 1.41.1+dfsg1
[rustc.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 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
10 | -- ------------ required by this bound in `f1`
11
12 error[E0631]: type mismatch in closure arguments
13 --> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
14 |
15 LL | f2(|_: (), _: ()| {});
16 | ^^ -------------- found signature of `fn((), ()) -> _`
17 | |
18 | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
19 ...
20 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
21 | -- ----------------------- required by this bound in `f2`
22
23 error[E0631]: type mismatch in closure arguments
24 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
25 |
26 LL | f3(|_: (), _: ()| {});
27 | ^^ -------------- found signature of `fn((), ()) -> _`
28 | |
29 | expected signature of `for<'r> fn(&(), &'r ()) -> _`
30 ...
31 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
32 | -- --------------- required by this bound in `f3`
33
34 error[E0631]: type mismatch in closure arguments
35 --> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
36 |
37 LL | f4(|_: (), _: ()| {});
38 | ^^ -------------- found signature of `fn((), ()) -> _`
39 | |
40 | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
41 ...
42 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
43 | -- ----------------------- required by this bound in `f4`
44
45 error[E0631]: type mismatch in closure arguments
46 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
47 |
48 LL | f5(|_: (), _: ()| {});
49 | ^^ -------------- found signature of `fn((), ()) -> _`
50 | |
51 | expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
52 ...
53 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
54 | -- -------------------------- required by this bound in `f5`
55
56 error[E0631]: type mismatch in closure arguments
57 --> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
58 |
59 LL | g1(|_: (), _: ()| {});
60 | ^^ -------------- found signature of `fn((), ()) -> _`
61 | |
62 | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _`
63 ...
64 LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
65 | -- ------------------------- required by this bound in `g1`
66
67 error[E0631]: type mismatch in closure arguments
68 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
69 |
70 LL | g2(|_: (), _: ()| {});
71 | ^^ -------------- found signature of `fn((), ()) -> _`
72 | |
73 | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
74 ...
75 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
76 | -- ---------------- required by this bound in `g2`
77
78 error[E0631]: type mismatch in closure arguments
79 --> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
80 |
81 LL | g3(|_: (), _: ()| {});
82 | ^^ -------------- found signature of `fn((), ()) -> _`
83 | |
84 | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
85 ...
86 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
87 | -- ------------------------------------ required by this bound in `g3`
88
89 error[E0631]: type mismatch in closure arguments
90 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
91 |
92 LL | g4(|_: (), _: ()| {});
93 | ^^ -------------- found signature of `fn((), ()) -> _`
94 | |
95 | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
96 ...
97 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
98 | -- --------------------------- required by this bound in `g4`
99
100 error[E0631]: type mismatch in closure arguments
101 --> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
102 |
103 LL | h1(|_: (), _: (), _: (), _: ()| {});
104 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
105 | |
106 | 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 ())) -> _`
107 ...
108 LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
109 | -- -------------------------------------------- required by this bound in `h1`
110
111 error[E0631]: type mismatch in closure arguments
112 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
113 |
114 LL | h2(|_: (), _: (), _: (), _: ()| {});
115 | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
116 | |
117 | 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 ())) -> _`
118 ...
119 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
120 | -- --------------------------------------------------------- required by this bound in `h2`
121
122 error: aborting due to 11 previous errors
123
124 For more information about this error, try `rustc --explain E0631`.