]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0310]: the parameter type `T` may not live long enough |
0731742a | 2 | --> $DIR/regions-close-param-into-object.rs:6:5 |
b7449926 | 3 | | |
dc9dc135 | 4 | LL | fn p1<T>(v: T) -> Box<dyn X + 'static> |
74b04a01 | 5 | | - help: consider adding an explicit lifetime bound...: `T: 'static` |
b7449926 | 6 | ... |
532ac7d7 | 7 | LL | Box::new(v) |
f9f354fc | 8 | | ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds |
b7449926 XL |
9 | |
10 | error[E0310]: the parameter type `T` may not live long enough | |
0731742a | 11 | --> $DIR/regions-close-param-into-object.rs:12:5 |
b7449926 | 12 | | |
dc9dc135 | 13 | LL | fn p2<T>(v: Box<T>) -> Box<dyn X + 'static> |
74b04a01 | 14 | | - help: consider adding an explicit lifetime bound...: `T: 'static` |
b7449926 | 15 | ... |
532ac7d7 | 16 | LL | Box::new(v) |
1b1a35ee | 17 | | ^^^^^^^^^^^ ...so that the type `Box<T>` will meet its required lifetime bounds |
b7449926 XL |
18 | |
19 | error[E0309]: the parameter type `T` may not live long enough | |
0731742a | 20 | --> $DIR/regions-close-param-into-object.rs:18:5 |
b7449926 | 21 | | |
dc9dc135 | 22 | LL | fn p3<'a,T>(v: T) -> Box<dyn X + 'a> |
74b04a01 | 23 | | - help: consider adding an explicit lifetime bound...: `T: 'a` |
b7449926 | 24 | ... |
532ac7d7 | 25 | LL | Box::new(v) |
f9f354fc | 26 | | ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds |
b7449926 XL |
27 | |
28 | error[E0309]: the parameter type `T` may not live long enough | |
0731742a | 29 | --> $DIR/regions-close-param-into-object.rs:24:5 |
b7449926 | 30 | | |
dc9dc135 | 31 | LL | fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a> |
74b04a01 | 32 | | - help: consider adding an explicit lifetime bound...: `T: 'a` |
b7449926 | 33 | ... |
532ac7d7 | 34 | LL | Box::new(v) |
1b1a35ee | 35 | | ^^^^^^^^^^^ ...so that the type `Box<T>` will meet its required lifetime bounds |
b7449926 XL |
36 | |
37 | error: aborting due to 4 previous errors | |
38 | ||
48663c56 | 39 | Some errors have detailed explanations: E0309, E0310. |
b7449926 | 40 | For more information about an error, try `rustc --explain E0309`. |