fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
2.7 KiB52 linesraw
1error: lifetime may not live long enough
2  --> $DIR/ref-mut-struct-async.rs:13:9
3   |
4LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
5   |                               -               - let's call the lifetime of this reference `'1`
6   |                               |
7   |                               let's call the lifetime of this reference `'2`
8LL |         f
9   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
10
11error: lifetime may not live long enough
12  --> $DIR/ref-mut-struct-async.rs:17:9
13   |
14LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
15   |                                       -                - let's call the lifetime of this reference `'1`
16   |                                       |
17   |                                       let's call the lifetime of this reference `'2`
18LL |         f
19   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
20
21error: lifetime may not live long enough
22  --> $DIR/ref-mut-struct-async.rs:21:9
23   |
24LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
25   |                                       -                - let's call the lifetime of this reference `'1`
26   |                                       |
27   |                                       let's call the lifetime of this reference `'2`
28LL |         f
29   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
30
31error: lifetime may not live long enough
32  --> $DIR/ref-mut-struct-async.rs:25:9
33   |
34LL |     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
35   |                                               -                 - let's call the lifetime of this reference `'1`
36   |                                               |
37   |                                               let's call the lifetime of this reference `'2`
38LL |         f
39   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
40
41error: lifetime may not live long enough
42  --> $DIR/ref-mut-struct-async.rs:29:9
43   |
44LL |     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
45   |                                               -                 - let's call the lifetime of this reference `'1`
46   |                                               |
47   |                                               let's call the lifetime of this reference `'2`
48LL |         f
49   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
50
51error: aborting due to 5 previous errors
52