]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0310]: the parameter type `A` may not live long enough |
04454e1e | 2 | --> $DIR/regions-close-over-type-parameter-1.rs:15:5 |
48663c56 | 3 | | |
c295e0f8 | 4 | LL | Box::new(v) as Box<dyn SomeTrait + 'static> |
04454e1e | 5 | | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds |
48663c56 | 6 | | |
04454e1e FG |
7 | help: consider adding an explicit lifetime bound... |
8 | | | |
9 | LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> { | |
10 | | +++++++++ | |
48663c56 XL |
11 | |
12 | error[E0309]: the parameter type `A` may not live long enough | |
04454e1e | 13 | --> $DIR/regions-close-over-type-parameter-1.rs:24:5 |
48663c56 | 14 | | |
c295e0f8 | 15 | LL | Box::new(v) as Box<dyn SomeTrait + 'b> |
04454e1e FG |
16 | | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds |
17 | | | |
18 | help: consider adding an explicit lifetime bound... | |
48663c56 | 19 | | |
04454e1e FG |
20 | LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> { |
21 | | ++++ | |
48663c56 XL |
22 | |
23 | error: aborting due to 2 previous errors | |
24 | ||
25 | Some errors have detailed explanations: E0309, E0310. | |
26 | For more information about an error, try `rustc --explain E0309`. |