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 FnOnce()` 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: 19:12]` 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...
50 LL ~ fn bar<'a, G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
55 error[E0311]: the parameter type `G` may not live long enough
56 --> $DIR/missing-lifetimes-in-signature.rs:52:5
60 LL | | *dest = g.get();
64 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
65 --> $DIR/missing-lifetimes-in-signature.rs:48:34
67 LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
69 note: ...so that the type `G` will meet its required lifetime bounds
70 --> $DIR/missing-lifetimes-in-signature.rs:52:5
74 LL | | *dest = g.get();
77 help: consider adding an explicit lifetime bound...
79 LL | fn qux<'b, 'a, G: 'a + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
82 error[E0311]: the parameter type `G` may not live long enough
83 --> $DIR/missing-lifetimes-in-signature.rs:61:9
87 LL | | *dest = g.get();
91 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
92 --> $DIR/missing-lifetimes-in-signature.rs:60:47
94 LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
96 note: ...so that the type `G` will meet its required lifetime bounds
97 --> $DIR/missing-lifetimes-in-signature.rs:61:9
101 LL | | *dest = g.get();
104 help: consider adding an explicit lifetime bound...
106 LL | fn qux<'c, 'b, G: Get<T> + 'b + 'c, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
109 error[E0311]: the parameter type `G` may not live long enough
110 --> $DIR/missing-lifetimes-in-signature.rs:73:5
115 LL | | *dest = g.get();
119 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
120 --> $DIR/missing-lifetimes-in-signature.rs:69:34
122 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
124 note: ...so that the type `G` will meet its required lifetime bounds
125 --> $DIR/missing-lifetimes-in-signature.rs:73:5
130 LL | | *dest = g.get();
133 help: consider adding an explicit lifetime bound...
135 LL | fn bat<'b, 'a, G: 'a + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
138 error[E0621]: explicit lifetime required in the type of `dest`
139 --> $DIR/missing-lifetimes-in-signature.rs:73:5
141 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
142 | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T`
147 LL | | *dest = g.get();
149 | |_____^ lifetime `'a` required
151 error[E0309]: the parameter type `G` may not live long enough
152 --> $DIR/missing-lifetimes-in-signature.rs:85:5
156 LL | | *dest = g.get();
158 | |_____^ ...so that the type `G` will meet its required lifetime bounds
160 help: consider adding an explicit lifetime bound...
165 error: aborting due to 8 previous errors
167 Some errors have detailed explanations: E0261, E0309, E0621, E0700.
168 For more information about an error, try `rustc --explain E0261`.