1 error[E0261]: use of undeclared lifetime name `'a`
2 --> $DIR/missing-lifetimes-in-signature.rs:37:11
4 LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
5 | - ^^ undeclared lifetime
7 | help: consider introducing lifetime `'a` here: `'a,`
9 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
10 --> $DIR/missing-lifetimes-in-signature.rs:19:5
12 LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce()
13 | ------ hidden type `[closure@$DIR/missing-lifetimes-in-signature.rs:19:5: 22:6]` captures the anonymous lifetime defined here
17 LL | | *dest = g.get();
21 help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'_` lifetime bound
23 LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
26 error[E0311]: the parameter type `G` may not live long enough
27 --> $DIR/missing-lifetimes-in-signature.rs:30:5
31 LL | | *dest = g.get();
35 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
36 --> $DIR/missing-lifetimes-in-signature.rs:26:26
38 LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
40 note: ...so that the type `G` will meet its required lifetime bounds
41 --> $DIR/missing-lifetimes-in-signature.rs:30:5
45 LL | | *dest = g.get();
48 help: consider adding an explicit lifetime bound...
53 error[E0311]: the parameter type `G` may not live long enough
54 --> $DIR/missing-lifetimes-in-signature.rs:52:5
58 LL | | *dest = g.get();
62 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
63 --> $DIR/missing-lifetimes-in-signature.rs:48:34
65 LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
67 note: ...so that the type `G` will meet its required lifetime bounds
68 --> $DIR/missing-lifetimes-in-signature.rs:52:5
72 LL | | *dest = g.get();
75 help: consider adding an explicit lifetime bound...
77 LL | fn qux<'a, G: 'a + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
80 error[E0311]: the parameter type `G` may not live long enough
81 --> $DIR/missing-lifetimes-in-signature.rs:61:9
85 LL | | *dest = g.get();
89 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
90 --> $DIR/missing-lifetimes-in-signature.rs:60:47
92 LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
94 note: ...so that the type `G` will meet its required lifetime bounds
95 --> $DIR/missing-lifetimes-in-signature.rs:61:9
99 LL | | *dest = g.get();
102 help: consider adding an explicit lifetime bound...
104 LL | fn qux<'b, G: Get<T> + 'b + 'c, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
107 error[E0311]: the parameter type `G` may not live long enough
108 --> $DIR/missing-lifetimes-in-signature.rs:73:5
113 LL | | *dest = g.get();
117 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
118 --> $DIR/missing-lifetimes-in-signature.rs:69:34
120 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
122 note: ...so that the type `G` will meet its required lifetime bounds
123 --> $DIR/missing-lifetimes-in-signature.rs:73:5
128 LL | | *dest = g.get();
131 help: consider adding an explicit lifetime bound...
133 LL | fn bat<'a, G: 'a + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
136 error[E0621]: explicit lifetime required in the type of `dest`
137 --> $DIR/missing-lifetimes-in-signature.rs:73:5
139 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
140 | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T`
145 LL | | *dest = g.get();
147 | |_____^ lifetime `'a` required
149 error[E0309]: the parameter type `G` may not live long enough
150 --> $DIR/missing-lifetimes-in-signature.rs:85:5
154 LL | | *dest = g.get();
156 | |_____^ ...so that the type `G` will meet its required lifetime bounds
158 help: consider adding an explicit lifetime bound...
163 error: aborting due to 8 previous errors
165 Some errors have detailed explanations: E0261, E0309, E0621, E0700.
166 For more information about an error, try `rustc --explain E0261`.