]>
Commit | Line | Data |
---|---|---|
1 | error[E0310]: the parameter type `A` may not live long enough | |
2 | --> $DIR/regions-close-over-type-parameter-1.rs:15:5 | |
3 | | | |
4 | LL | Box::new(v) as Box<dyn SomeTrait + 'static> | |
5 | | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | |
6 | | | |
7 | help: consider adding an explicit lifetime bound... | |
8 | | | |
9 | LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> { | |
10 | | +++++++++ | |
11 | ||
12 | error[E0309]: the parameter type `A` may not live long enough | |
13 | --> $DIR/regions-close-over-type-parameter-1.rs:24:5 | |
14 | | | |
15 | LL | Box::new(v) as Box<dyn SomeTrait + 'b> | |
16 | | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | |
17 | | | |
18 | help: consider adding an explicit lifetime bound... | |
19 | | | |
20 | LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> { | |
21 | | ++++ | |
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`. |