1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/regions-close-object-into-object-5.rs:17:5
4 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
5 | - help: consider adding an explicit lifetime bound...: `T: 'static`
7 LL | box B(&*v) as Box<X>
8 | ^^^^^^^^^^ ...so that the type `B<'_, T>` will meet its required lifetime bounds
10 error[E0310]: the parameter type `T` may not live long enough
11 --> $DIR/regions-close-object-into-object-5.rs:17:9
13 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
14 | - help: consider adding an explicit lifetime bound...: `T: 'static`
16 LL | box B(&*v) as Box<X>
17 | ^ ...so that the type `T` will meet its required lifetime bounds
19 error[E0310]: the parameter type `T` may not live long enough
20 --> $DIR/regions-close-object-into-object-5.rs:17:9
22 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
23 | - help: consider adding an explicit lifetime bound...: `T: 'static`
25 LL | box B(&*v) as Box<X>
26 | ^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
28 note: ...that is required by this bound
29 --> $DIR/regions-close-object-into-object-5.rs:9:17
31 LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
34 error[E0310]: the parameter type `T` may not live long enough
35 --> $DIR/regions-close-object-into-object-5.rs:17:11
37 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
38 | - help: consider adding an explicit lifetime bound...: `T: 'static`
40 LL | box B(&*v) as Box<X>
41 | ^^^ ...so that the reference type `&dyn A<T>` does not outlive the data it points at
43 error[E0310]: the parameter type `T` may not live long enough
44 --> $DIR/regions-close-object-into-object-5.rs:17:11
46 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
47 | - help: consider adding an explicit lifetime bound...: `T: 'static`
49 LL | box B(&*v) as Box<X>
50 | ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
52 error[E0310]: the parameter type `T` may not live long enough
53 --> $DIR/regions-close-object-into-object-5.rs:17:11
55 LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
56 | - help: consider adding an explicit lifetime bound...: `T: 'static`
58 LL | box B(&*v) as Box<X>
59 | ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
61 error: aborting due to 6 previous errors
63 For more information about this error, try `rustc --explain E0310`.