blob: 99bee4a36c1d1c5dfcd13137dd0fb4935d8d8a3f [file] [log] [blame]
warning: not reporting region error due to nll
--> $DIR/regions-trait-object-subtyping.rs:25:5
|
LL | x //~ ERROR lifetime bound not satisfied
| ^
warning: not reporting region error due to nll
--> $DIR/regions-trait-object-subtyping.rs:32:5
|
LL | x //~ ERROR mismatched types
| ^
error: unsatisfied lifetime constraints
--> $DIR/regions-trait-object-subtyping.rs:23:51
|
LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy {
| _________--_--_____________________________________^
| | | |
| | | lifetime `'b` defined here
| | lifetime `'a` defined here
LL | | // Without knowing 'a:'b, we can't coerce
LL | | x //~ ERROR lifetime bound not satisfied
LL | | //~^ ERROR cannot infer an appropriate lifetime
LL | | }
| |_^ returning this value requires that `'a` must outlive `'b`
error: unsatisfied lifetime constraints
--> $DIR/regions-trait-object-subtyping.rs:32:5
|
LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | // We can't coerce because it is packed in `Wrapper`
LL | x //~ ERROR mismatched types
| ^ returning this value requires that `'b` must outlive `'a`
error: aborting due to 2 previous errors