1 error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
2 --> $DIR/regions-close-object-into-object-4.rs:10:11
4 LL | box B(&*v) as Box<dyn X>
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 9:6...
8 --> $DIR/regions-close-object-into-object-4.rs:9:6
10 LL | fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
12 note: ...so that the type `(dyn A<U> + 'a)` is not borrowed for too long
13 --> $DIR/regions-close-object-into-object-4.rs:10:11
15 LL | box B(&*v) as Box<dyn X>
17 = note: but, the lifetime must be valid for the static lifetime...
18 = note: ...so that the expression is assignable:
19 expected std::boxed::Box<(dyn X + 'static)>
20 found std::boxed::Box<dyn X>
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0495`.