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 | ------ ------------- opaque type defined here
15 | hidden type `{closure@$DIR/missing-lifetimes-in-signature.rs:19:5: 19:12}` captures the anonymous lifetime defined here
19 LL | | *dest = g.get();
23 help: to declare that `impl FnOnce()` captures `'_`, you can add an explicit `'_` lifetime bound
25 LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
28 error[E0311]: the parameter type `G` may not live long enough
29 --> $DIR/missing-lifetimes-in-signature.rs:30:5
33 LL | | *dest = g.get();
37 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
38 --> $DIR/missing-lifetimes-in-signature.rs:26:26
40 LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
42 note: ...so that the type `G` will meet its required lifetime bounds
43 --> $DIR/missing-lifetimes-in-signature.rs:30:5
47 LL | | *dest = g.get();
50 help: consider adding an explicit lifetime bound...
52 LL ~ fn bar<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + '_
57 error[E0311]: the parameter type `G` may not live long enough
58 --> $DIR/missing-lifetimes-in-signature.rs:52:5
62 LL | | *dest = g.get();
66 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
67 --> $DIR/missing-lifetimes-in-signature.rs:48:34
69 LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
71 note: ...so that the type `G` will meet its required lifetime bounds
72 --> $DIR/missing-lifetimes-in-signature.rs:52:5
76 LL | | *dest = g.get();
79 help: consider adding an explicit lifetime bound...
81 LL | fn qux<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + '_
84 error[E0311]: the parameter type `G` may not live long enough
85 --> $DIR/missing-lifetimes-in-signature.rs:61:9
89 LL | | *dest = g.get();
93 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
94 --> $DIR/missing-lifetimes-in-signature.rs:60:47
96 LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
98 note: ...so that the type `G` will meet its required lifetime bounds
99 --> $DIR/missing-lifetimes-in-signature.rs:61:9
103 LL | | *dest = g.get();
106 help: consider adding an explicit lifetime bound...
108 LL | fn qux<'c, 'b, G: Get<T> + 'b + 'c, T>(g: G, dest: &'c mut T) -> impl FnOnce() + '_ {
111 error[E0311]: the parameter type `G` may not live long enough
112 --> $DIR/missing-lifetimes-in-signature.rs:73:5
117 LL | | *dest = g.get();
121 note: the parameter type `G` must be valid for the anonymous lifetime defined here...
122 --> $DIR/missing-lifetimes-in-signature.rs:69:34
124 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
126 note: ...so that the type `G` will meet its required lifetime bounds
127 --> $DIR/missing-lifetimes-in-signature.rs:73:5
132 LL | | *dest = g.get();
135 help: consider adding an explicit lifetime bound...
137 LL | fn bat<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + '_ + 'a
140 error[E0621]: explicit lifetime required in the type of `dest`
141 --> $DIR/missing-lifetimes-in-signature.rs:73:5
143 LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
144 | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T`
149 LL | | *dest = g.get();
151 | |_____^ lifetime `'a` required
153 error[E0309]: the parameter type `G` may not live long enough
154 --> $DIR/missing-lifetimes-in-signature.rs:85:5
158 LL | | *dest = g.get();
160 | |_____^ ...so that the type `G` will meet its required lifetime bounds
162 help: consider adding an explicit lifetime bound...
167 error: aborting due to 8 previous errors
169 Some errors have detailed explanations: E0261, E0309, E0311, E0621, E0700.
170 For more information about an error, try `rustc --explain E0261`.