]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | error: unsatisfied lifetime constraints |
2 | --> $DIR/regions-trait-object-subtyping.rs:25:5 | |
3 | | | |
4 | LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { | |
5 | | -- -- lifetime `'b` defined here | |
6 | | | | |
7 | | lifetime `'a` defined here | |
8 | LL | // Without knowing 'a:'b, we can't coerce | |
9 | LL | x //~ ERROR lifetime bound not satisfied | |
10 | | ^ returning this value requires that `'a` must outlive `'b` | |
11 | ||
12 | error: unsatisfied lifetime constraints | |
13 | --> $DIR/regions-trait-object-subtyping.rs:32:5 | |
14 | | | |
15 | LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> { | |
16 | | -- -- lifetime `'b` defined here | |
17 | | | | |
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` | |
22 | ||
23 | error: aborting due to 2 previous errors | |
24 |