Skip to content

Commit 9434d6b

Browse files
committed
update some tests
1 parent 7a6361f commit 9434d6b

22 files changed

+77
-77
lines changed

src/test/ui/async-await/issues/issue-62097.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ help: to force the closure to take ownership of `self` (and any other referenced
1616
LL | foo(move || self.bar()).await;
1717
| ^^^^^^^
1818

19-
error[E0521]: borrowed data escapes outside of function
19+
error[E0521]: borrowed data escapes outside of method
2020
--> $DIR/issue-62097.rs:13:9
2121
|
2222
LL | pub async fn run_dummy_fn(&self) {
23-
| ----- `self` is a reference that is only valid in the function body
23+
| ----- `self` is a reference that is only valid in the method body
2424
LL | foo(|| self.bar()).await;
25-
| ^^^^^^^^^^^^^^^^^^ `self` escapes the function body here
25+
| ^^^^^^^^^^^^^^^^^^ `self` escapes the method body here
2626

2727
error: aborting due to 2 previous errors
2828

src/test/ui/async-await/issues/issue-63388-1.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | ) -> &dyn Foo
99
LL | / {
1010
LL | | foo
1111
LL | | }
12-
| |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
12+
| |_____^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
1313

1414
error: aborting due to previous error
1515

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0521]: borrowed data escapes outside of function
1+
error[E0521]: borrowed data escapes outside of method
22
--> $DIR/issue-16683.rs:4:9
33
|
44
LL | fn b(&self) {
5-
| ----- `self` is a reference that is only valid in the function body
5+
| ----- `self` is a reference that is only valid in the method body
66
LL | self.a();
7-
| ^^^^^^^^ `self` escapes the function body here
7+
| ^^^^^^^^ `self` escapes the method body here
88

99
error: aborting due to previous error
1010

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0521]: borrowed data escapes outside of function
1+
error[E0521]: borrowed data escapes outside of method
22
--> $DIR/issue-17758.rs:7:9
33
|
44
LL | fn bar(&self) {
5-
| ----- `self` is a reference that is only valid in the function body
5+
| ----- `self` is a reference that is only valid in the method body
66
LL | self.foo();
7-
| ^^^^^^^^^^ `self` escapes the function body here
7+
| ^^^^^^^^^^ `self` escapes the method body here
88

99
error: aborting due to previous error
1010

src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
77
| lifetime `'a` defined here
88
LL |
99
LL | if x > y { x } else { y }
10-
| ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
10+
| ^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
1111

1212
error: aborting due to previous error
1313

src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a i32) -> &i32 {
77
| lifetime `'a` defined here
88
LL |
99
LL | x
10-
| ^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
10+
| ^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
1111

1212
error: aborting due to previous error
1313

src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo {
77
| lifetime `'a` defined here
88
LL |
99
LL | if true { x } else { self }
10-
| ^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
10+
| ^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
1111

1212
error: aborting due to previous error
1313

src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &i32) -> &i32 {
66
| |
77
| let's call the lifetime of this reference `'2`
88
LL | x
9-
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
9+
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
1010

1111
error: aborting due to previous error
1212

src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &Foo) -> &Foo {
66
| |
77
| let's call the lifetime of this reference `'2`
88
LL | if true { x } else { self }
9-
| ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
9+
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
1010

1111
error: aborting due to previous error
1212

src/test/ui/nll/outlives-suggestion-simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub struct Foo2<'a> {
7070
impl<'a> Foo2<'a> {
7171
// should not produce outlives suggestions to name 'self
7272
fn get_bar(&self) -> Bar2 {
73-
Bar2::new(&self) //~ERROR borrowed data escapes outside of function
73+
Bar2::new(&self) //~ERROR borrowed data escapes outside of method
7474
}
7575
}
7676

0 commit comments

Comments
 (0)