|
1 | 1 | error[E0261]: use of undeclared lifetime name `'a`
|
2 |
| - --> $DIR/missing-lifetimes-in-signature.rs:37:11 |
| 2 | + --> $DIR/missing-lifetimes-in-signature.rs:36:11 |
3 | 3 | |
|
4 | 4 | LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
|
5 | 5 | | - ^^ undeclared lifetime
|
6 | 6 | | |
|
7 | 7 | | help: consider introducing lifetime `'a` here: `'a,`
|
8 | 8 |
|
9 |
| -error: lifetime may not live long enough |
10 |
| - --> $DIR/missing-lifetimes-in-signature.rs:15:37 |
11 |
| - | |
12 |
| -LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() |
13 |
| - | - ^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static` |
14 |
| - | | |
15 |
| - | let's call the lifetime of this reference `'1` |
16 |
| - | |
17 |
| -help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound |
18 |
| - | |
19 |
| -LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ |
20 |
| - | ^^^^^^^^^^^^^^^^^^ |
21 |
| - |
22 |
| -error[E0311]: the parameter type `G` may not live long enough |
23 |
| - --> $DIR/missing-lifetimes-in-signature.rs:25:37 |
24 |
| - | |
25 |
| -LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ |
26 |
| - | ^^^^^^^^^^^^^^^^^^ |
27 |
| - | |
28 |
| -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 25:26... |
29 |
| - --> $DIR/missing-lifetimes-in-signature.rs:25:26 |
30 |
| - | |
31 |
| -LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ |
32 |
| - | ^^^^^^ |
33 |
| - |
34 |
| -error[E0311]: the parameter type `G` may not live long enough |
35 |
| - --> $DIR/missing-lifetimes-in-signature.rs:47:45 |
36 |
| - | |
37 |
| -LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ |
38 |
| - | ^^^^^^^^^^^^^^^^^^ |
39 |
| - | |
40 |
| -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 47:34... |
41 |
| - --> $DIR/missing-lifetimes-in-signature.rs:47:34 |
42 |
| - | |
43 |
| -LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ |
44 |
| - | ^^^^^^ |
45 |
| - |
46 |
| -error[E0311]: the parameter type `G` may not live long enough |
47 |
| - --> $DIR/missing-lifetimes-in-signature.rs:59:58 |
48 |
| - | |
49 |
| -LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ { |
50 |
| - | ^^^^^^^^^^^^^^^^^^ |
51 |
| - | |
52 |
| -note: the parameter type `G` must be valid for the anonymous lifetime defined on the method body at 59:47... |
53 |
| - --> $DIR/missing-lifetimes-in-signature.rs:59:47 |
54 |
| - | |
55 |
| -LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ { |
56 |
| - | ^^^^^^ |
57 |
| - |
58 |
| -error[E0311]: the parameter type `G` may not live long enough |
59 |
| - --> $DIR/missing-lifetimes-in-signature.rs:68:45 |
60 |
| - | |
61 |
| -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a |
62 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^ |
63 |
| - | |
64 |
| -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 68:34... |
65 |
| - --> $DIR/missing-lifetimes-in-signature.rs:68:34 |
66 |
| - | |
67 |
| -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a |
68 |
| - | ^^^^^^ |
69 |
| - |
70 |
| -error[E0621]: explicit lifetime required in the type of `dest` |
71 |
| - --> $DIR/missing-lifetimes-in-signature.rs:73:5 |
72 |
| - | |
73 |
| -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a |
74 |
| - | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T` |
75 |
| -... |
76 |
| -LL | / move || { |
77 |
| -LL | | *dest = g.get(); |
78 |
| -LL | | } |
79 |
| - | |_____^ lifetime `'a` required |
80 |
| - |
81 |
| -error[E0309]: the parameter type `G` may not live long enough |
82 |
| - --> $DIR/missing-lifetimes-in-signature.rs:79:44 |
83 |
| - | |
84 |
| -LL | fn bak<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + 'a |
85 |
| - | ^^^^^^^^^^^^^^^^^^ |
86 |
| - | |
87 |
| - = help: consider adding an explicit lifetime bound `G: 'a`... |
88 |
| - |
89 |
| -error: aborting due to 8 previous errors |
| 9 | +error: aborting due to previous error |
90 | 10 |
|
91 |
| -Some errors have detailed explanations: E0261, E0309, E0621. |
92 |
| -For more information about an error, try `rustc --explain E0261`. |
| 11 | +For more information about this error, try `rustc --explain E0261`. |
0 commit comments