blob: 2fb9dcc4e9ec77c3c9b5f59c79b59aeaaeee8ab3 [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/regions-close-over-type-parameter-multiple.rs:20:5
|
LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
| -- -- lifetime `'c` defined here
| |
| lifetime `'a` defined here
LL | // A outlives 'a AND 'b...but not 'c.
LL | box v as Box<dyn SomeTrait + 'a>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'c`
|
= help: consider adding the following bound: `'a: 'c`
error: aborting due to previous error