blob: f92923a112584138fcfd35dd36c0da70356438b5 [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/regions-trait-object-subtyping.rs:15:5
|
LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | // Without knowing 'a:'b, we can't coerce
LL | x
| ^ returning this value requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
error: lifetime may not live long enough
--> $DIR/regions-trait-object-subtyping.rs:22:5
|
LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | // We can't coerce because it is packed in `Wrapper`
LL | x
| ^ returning this value requires that `'b` must outlive `'a`
|
= help: consider adding the following bound: `'b: 'a`
error: aborting due to 2 previous errors