update some tests

This commit is contained in:
Mark Mansi 2020-02-22 16:14:14 -06:00
parent 7a6361f465
commit 9434d6b67f
22 changed files with 77 additions and 77 deletions

View File

@ -16,13 +16,13 @@ help: to force the closure to take ownership of `self` (and any other referenced
LL | foo(move || self.bar()).await;
| ^^^^^^^
error[E0521]: borrowed data escapes outside of function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-62097.rs:13:9
|
LL | pub async fn run_dummy_fn(&self) {
| ----- `self` is a reference that is only valid in the function body
| ----- `self` is a reference that is only valid in the method body
LL | foo(|| self.bar()).await;
| ^^^^^^^^^^^^^^^^^^ `self` escapes the function body here
| ^^^^^^^^^^^^^^^^^^ `self` escapes the method body here
error: aborting due to 2 previous errors

View File

@ -9,7 +9,7 @@ LL | ) -> &dyn Foo
LL | / {
LL | | foo
LL | | }
| |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
| |_____^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -1,10 +1,10 @@
error[E0521]: borrowed data escapes outside of function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-16683.rs:4:9
|
LL | fn b(&self) {
| ----- `self` is a reference that is only valid in the function body
| ----- `self` is a reference that is only valid in the method body
LL | self.a();
| ^^^^^^^^ `self` escapes the function body here
| ^^^^^^^^ `self` escapes the method body here
error: aborting due to previous error

View File

@ -1,10 +1,10 @@
error[E0521]: borrowed data escapes outside of function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-17758.rs:7:9
|
LL | fn bar(&self) {
| ----- `self` is a reference that is only valid in the function body
| ----- `self` is a reference that is only valid in the method body
LL | self.foo();
| ^^^^^^^^^^ `self` escapes the function body here
| ^^^^^^^^^^ `self` escapes the method body here
error: aborting due to previous error

View File

@ -7,7 +7,7 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
| lifetime `'a` defined here
LL |
LL | if x > y { x } else { y }
| ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a i32) -> &i32 {
| lifetime `'a` defined here
LL |
LL | x
| ^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| ^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
error: aborting due to previous error

View File

@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo {
| lifetime `'a` defined here
LL |
LL | if true { x } else { self }
| ^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
| ^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &i32) -> &i32 {
| |
| let's call the lifetime of this reference `'2`
LL | x
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &Foo) -> &Foo {
| |
| let's call the lifetime of this reference `'2`
LL | if true { x } else { self }
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -70,7 +70,7 @@ pub struct Foo2<'a> {
impl<'a> Foo2<'a> {
// should not produce outlives suggestions to name 'self
fn get_bar(&self) -> Bar2 {
Bar2::new(&self) //~ERROR borrowed data escapes outside of function
Bar2::new(&self) //~ERROR borrowed data escapes outside of method
}
}

View File

@ -93,16 +93,16 @@ LL | self.x
|
= help: consider adding the following bound: `'b: 'a`
error[E0521]: borrowed data escapes outside of function
error[E0521]: borrowed data escapes outside of method
--> $DIR/outlives-suggestion-simple.rs:73:9
|
LL | fn get_bar(&self) -> Bar2 {
| -----
| |
| `self` declared here, outside of the function body
| `self` is a reference that is only valid in the function body
| `self` declared here, outside of the method body
| `self` is a reference that is only valid in the method body
LL | Bar2::new(&self)
| ^^^^^^^^^^^^^^^^ `self` escapes the function body here
| ^^^^^^^^^^^^^^^^ `self` escapes the method body here
error: aborting due to 9 previous errors

View File

@ -2,7 +2,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
|
LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
| - - ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -11,7 +11,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
|
LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
| - - ^^^^^^^^^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -20,7 +20,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
|
LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| -- - ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| -- - ^^^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| | |
| | let's call the lifetime of this reference `'1`
| lifetime `'a` defined here

View File

@ -2,7 +2,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:6:46
|
LL | fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
| - - ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -11,7 +11,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:8:69
|
LL | fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
| - - ^^^^^^^^^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -20,7 +20,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:13:58
|
LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| -- ---- has type `std::pin::Pin<&'1 Foo>` ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| -- ---- has type `std::pin::Pin<&'1 Foo>` ^^^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| |
| lifetime `'a` defined here

View File

@ -6,7 +6,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:19:9
@ -16,7 +16,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:23:9
@ -26,7 +26,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:27:9
@ -36,7 +36,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:31:9
@ -46,7 +46,7 @@ LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self-async.rs:35:9
@ -56,7 +56,7 @@ LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 6 previous errors

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self.rs:17:9
@ -16,7 +16,7 @@ LL | fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self.rs:21:9
@ -26,7 +26,7 @@ LL | fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self.rs:25:9
@ -36,7 +36,7 @@ LL | fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self.rs:29:9
@ -46,7 +46,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/lt-ref-self.rs:33:9
@ -56,7 +56,7 @@ LL | fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 6 previous errors

View File

@ -6,7 +6,7 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:19:9
@ -16,7 +16,7 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:23:9
@ -26,7 +26,7 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:27:9
@ -36,7 +36,7 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:31:9
@ -46,7 +46,7 @@ LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self-async.rs:35:9
@ -56,7 +56,7 @@ LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 6 previous errors

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&mut self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self.rs:17:9
@ -16,7 +16,7 @@ LL | fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self.rs:21:9
@ -26,7 +26,7 @@ LL | fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self.rs:25:9
@ -36,7 +36,7 @@ LL | fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self.rs:29:9
@ -46,7 +46,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-self.rs:33:9
@ -56,7 +56,7 @@ LL | fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 6 previous errors

View File

@ -6,7 +6,7 @@ LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:17:9
@ -16,7 +16,7 @@ LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:21:9
@ -26,7 +26,7 @@ LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:25:9
@ -36,7 +36,7 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct-async.rs:29:9
@ -46,7 +46,7 @@ LL | async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 5 previous errors

View File

@ -6,7 +6,7 @@ LL | fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct.rs:15:9
@ -16,7 +16,7 @@ LL | fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct.rs:19:9
@ -26,7 +26,7 @@ LL | fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct.rs:23:9
@ -36,7 +36,7 @@ LL | fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-mut-struct.rs:27:9
@ -46,7 +46,7 @@ LL | fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 5 previous errors

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:27:9
@ -16,7 +16,7 @@ LL | fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:31:9
@ -26,7 +26,7 @@ LL | fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:35:9
@ -36,7 +36,7 @@ LL | fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:39:9
@ -46,7 +46,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:43:9
@ -56,7 +56,7 @@ LL | fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-self.rs:47:9
@ -66,7 +66,7 @@ LL | fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 7 previous errors

View File

@ -6,7 +6,7 @@ LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:17:9
@ -16,7 +16,7 @@ LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:21:9
@ -26,7 +26,7 @@ LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:25:9
@ -36,7 +36,7 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct-async.rs:29:9
@ -46,7 +46,7 @@ LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 5 previous errors

View File

@ -6,7 +6,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct.rs:15:9
@ -16,7 +16,7 @@ LL | fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct.rs:19:9
@ -26,7 +26,7 @@ LL | fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct.rs:23:9
@ -36,7 +36,7 @@ LL | fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: lifetime may not live long enough
--> $DIR/ref-struct.rs:27:9
@ -46,7 +46,7 @@ LL | fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
error: aborting due to 5 previous errors