1 error: unsatisfied lifetime constraints
2 --> $DIR/regions-trait-object-subtyping.rs:25:5
4 LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
5 | -- -- lifetime `'b` defined here
7 | lifetime `'a` defined here
8 LL | // Without knowing 'a:'b, we can't coerce
9 LL | x //~ ERROR lifetime bound not satisfied
10 | ^ cast requires that `'a` must outlive `'b`
12 error: unsatisfied lifetime constraints
13 --> $DIR/regions-trait-object-subtyping.rs:32:5
15 LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
16 | -- -- lifetime `'b` defined here
18 | lifetime `'a` defined here
19 LL | // We can't coerce because it is packed in `Wrapper`
20 LL | x //~ ERROR mismatched types
21 | ^ returning this value requires that `'b` must outlive `'a`
23 error: aborting due to 2 previous errors