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 | Box::new(B(&*v)) as Box<dyn X>
7 = help: consider adding an explicit lifetime bound `T: 'static`...
9 error[E0310]: the parameter type `T` may not live long enough
10 --> $DIR/regions-close-object-into-object-5.rs:17:5
12 LL | Box::new(B(&*v)) as Box<dyn X>
15 = help: consider adding an explicit lifetime bound `T: 'static`...
17 error[E0310]: the parameter type `T` may not live long enough
18 --> $DIR/regions-close-object-into-object-5.rs:17:5
20 LL | Box::new(B(&*v)) as Box<dyn X>
23 = help: consider adding an explicit lifetime bound `T: 'static`...
25 error[E0515]: cannot return value referencing local data `*v`
26 --> $DIR/regions-close-object-into-object-5.rs:17:5
28 LL | Box::new(B(&*v)) as Box<dyn X>
29 | ^^^^^^^^^^^---^^^^^^^^^^^^^^^^
31 | | `*v` is borrowed here
32 | returns a value referencing data owned by the current function
34 error[E0310]: the parameter type `T` may not live long enough
35 --> $DIR/regions-close-object-into-object-5.rs:17:14
37 LL | Box::new(B(&*v)) as Box<dyn X>
40 = help: consider adding an explicit lifetime bound `T: 'static`...
42 error: aborting due to 5 previous errors
44 Some errors have detailed explanations: E0310, E0515.
45 For more information about an error, try `rustc --explain E0310`.