blob: f4b1a89db9a73ef8ef1510a465a72aebffb4cce3 [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`
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`
error: aborting due to 2 previous errors