fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: lifetime may not live long enough 2 --> $DIR/ref-struct-async.rs:13:9 3 | 4LL | async fn ref_Struct(self: &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 | 11help: consider introducing a named lifetime parameter and update trait if needed 12 | 13LL | async fn ref_Struct<'a>(self: &'a Struct, f: &'a u32) -> &u32 { 14 | ++++ ++ ++ 15 16error: lifetime may not live long enough 17 --> $DIR/ref-struct-async.rs:18:9 18 | 19LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { 20 | - - let's call the lifetime of this reference `'1` 21 | | 22 | let's call the lifetime of this reference `'2` 23LL | f 24 | ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` 25 | 26help: consider introducing a named lifetime parameter and update trait if needed 27 | 28LL | async fn box_ref_Struct<'a>(self: Box<&'a Struct>, f: &'a u32) -> &u32 { 29 | ++++ ++ ++ 30 31error: lifetime may not live long enough 32 --> $DIR/ref-struct-async.rs:23:9 33 | 34LL | async fn pin_ref_Struct(self: Pin<&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 | 41help: consider introducing a named lifetime parameter and update trait if needed 42 | 43LL | async fn pin_ref_Struct<'a>(self: Pin<&'a Struct>, f: &'a u32) -> &u32 { 44 | ++++ ++ ++ 45 46error: lifetime may not live long enough 47 --> $DIR/ref-struct-async.rs:28:9 48 | 49LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 { 50 | - - let's call the lifetime of this reference `'1` 51 | | 52 | let's call the lifetime of this reference `'2` 53LL | f 54 | ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` 55 | 56help: consider introducing a named lifetime parameter and update trait if needed 57 | 58LL | async fn box_box_ref_Struct<'a>(self: Box<Box<&'a Struct>>, f: &'a u32) -> &u32 { 59 | ++++ ++ ++ 60 61error: lifetime may not live long enough 62 --> $DIR/ref-struct-async.rs:33:9 63 | 64LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 { 65 | - - let's call the lifetime of this reference `'1` 66 | | 67 | let's call the lifetime of this reference `'2` 68LL | f 69 | ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` 70 | 71help: consider introducing a named lifetime parameter and update trait if needed 72 | 73LL | async fn box_pin_Struct<'a>(self: Box<Pin<&'a Struct>>, f: &'a u32) -> &u32 { 74 | ++++ ++ ++ 75 76error: aborting due to 5 previous errors 77