1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2 --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
4 LL | box v as Box<dyn SomeTrait + 'a>
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 18:20...
8 --> $DIR/regions-close-over-type-parameter-multiple.rs:18:20
10 LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
12 note: ...so that the declared lifetime parameter bounds are satisfied
13 --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
15 LL | box v as Box<dyn SomeTrait + 'a>
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 note: but, the lifetime must be valid for the lifetime `'c` as defined on the function body at 18:26...
18 --> $DIR/regions-close-over-type-parameter-multiple.rs:18:26
20 LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
22 = note: ...so that the expression is assignable:
23 expected std::boxed::Box<(dyn SomeTrait + 'c)>
24 found std::boxed::Box<dyn SomeTrait>
26 error: aborting due to previous error
28 For more information about this error, try `rustc --explain E0495`.