]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-trait-object-subtyping.nll.stderr
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-trait-object-subtyping.nll.stderr
1 error: lifetime may not live long enough
2 --> $DIR/regions-trait-object-subtyping.rs:15: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
10 | ^ returning this value requires that `'a` must outlive `'b`
11
12 error: lifetime may not live long enough
13 --> $DIR/regions-trait-object-subtyping.rs:22: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
21 | ^ returning this value requires that `'b` must outlive `'a`
22
23 error: aborting due to 2 previous errors
24