fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error: lifetime may not live long enough 2 --> $DIR/regions-trait-object-subtyping.rs:15:5 3 | 4LL | fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy { 5 | -- -- lifetime `'b` defined here 6 | | 7 | lifetime `'a` defined here 8LL | // Without knowing 'a:'b, we can't coerce 9LL | x 10 | ^ returning this value requires that `'a` must outlive `'b` 11 | 12 = help: consider adding the following bound: `'a: 'b` 13 14error: lifetime may not live long enough 15 --> $DIR/regions-trait-object-subtyping.rs:22:5 16 | 17LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> { 18 | -- -- lifetime `'b` defined here 19 | | 20 | lifetime `'a` defined here 21LL | // We can't coerce because it is packed in `Wrapper` 22LL | x 23 | ^ returning this value requires that `'b` must outlive `'a` 24 | 25 = help: consider adding the following bound: `'b: 'a` 26 27error: aborting due to 2 previous errors 28