Skip to content

Commit 371c23f

Browse files
committed
Update tests
1 parent 372e4ae commit 371c23f

33 files changed

+63
-65
lines changed

src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
55
| ^^^^^^
66

77
error: unsatisfied lifetime constraints
8-
--> $DIR/E0621-does-not-trigger-for-closures.rs:25:26
8+
--> $DIR/E0621-does-not-trigger-for-closures.rs:25:45
99
|
1010
LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
11-
| -- ^^^^^ requires that `'1` must outlive `'2`
11+
| -- ^ returning this value requires that `'1` must outlive `'2`
1212
| ||
1313
| |return type of closure is &'2 i32
1414
| has type `&'1 i32`

src/test/ui/in-band-lifetimes/mismatched.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ error: unsatisfied lifetime constraints
2222
--> $DIR/mismatched.rs:16:46
2323
|
2424
LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch
25-
| -- -- ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
25+
| -- -- ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
2626
| | |
2727
| | lifetime `'b` defined here
2828
| lifetime `'a` defined here

src/test/ui/issues/issue-14285.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ LL | B(a) //~ ERROR 22:5: 22:9: explicit lifetime required in the type of
55
| ^
66

77
error[E0621]: explicit lifetime required in the type of `a`
8-
--> $DIR/issue-14285.rs:22:7
8+
--> $DIR/issue-14285.rs:22:5
99
|
1010
LL | fn foo<'a>(a: &Foo) -> B<'a> {
1111
| ---- help: add explicit lifetime `'a` to the type of `a`: `&'a (dyn Foo + 'a)`
1212
LL | B(a) //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621]
13-
| ^ lifetime `'a` required
13+
| ^^^^ lifetime `'a` required
1414

1515
error: aborting due to previous error
1616

src/test/ui/issues/issue-15034.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ LL | Parser { lexer: lexer }
55
| ^^^^^^
66

77
error[E0621]: explicit lifetime required in the type of `lexer`
8-
--> $DIR/issue-15034.rs:27:25
8+
--> $DIR/issue-15034.rs:27:9
99
|
1010
LL | pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
1111
| ------------- help: add explicit lifetime `'a` to the type of `lexer`: `&'a mut Lexer<'a>`
1212
LL | Parser { lexer: lexer }
13-
| ^^^^^ lifetime `'a` required
13+
| ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required
1414

1515
error: aborting due to previous error
1616

src/test/ui/issues/issue-3154.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ LL | thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the
1111
| ^^^^^
1212

1313
error[E0621]: explicit lifetime required in the type of `x`
14-
--> $DIR/issue-3154.rs:16:15
14+
--> $DIR/issue-3154.rs:16:5
1515
|
1616
LL | fn thing<'a,Q>(x: &Q) -> thing<'a,Q> {
1717
| -- help: add explicit lifetime `'a` to the type of `x`: `&'a Q`
1818
LL | thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
19-
| ^ lifetime `'a` required
19+
| ^^^^^^^^^^^^^ lifetime `'a` required
2020

2121
error: aborting due to previous error
2222

src/test/ui/issues/issue-40510-1.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | || {
77
| |return type of closure is &'2 mut std::boxed::Box<()>
88
| lifetime `'1` represents this closure's body
99
LL | &mut x
10-
| ^^^^^^ return requires that `'1` must outlive `'2`
10+
| ^^^^^^ returning this value requires that `'1` must outlive `'2`
1111
|
1212
= note: closure implements `FnMut`, so references to captured variables can't escape the closure
1313

src/test/ui/issues/issue-40510-3.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | || {
99
LL | / || {
1010
LL | | x.push(())
1111
LL | | }
12-
| |_________^ requires that `'1` must outlive `'2`
12+
| |_________^ returning this value requires that `'1` must outlive `'2`
1313
|
1414
= note: closure implements `FnMut`, so references to captured variables can't escape the closure
1515

src/test/ui/issues/issue-49824.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | || {
99
LL | / || {
1010
LL | | let _y = &mut x;
1111
LL | | }
12-
| |_________^ requires that `'1` must outlive `'2`
12+
| |_________^ returning this value requires that `'1` must outlive `'2`
1313
|
1414
= note: closure implements `FnMut`, so references to captured variables can't escape the closure
1515

src/test/ui/issues/issue-52213.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
55
| ^^^^^
66

77
error: unsatisfied lifetime constraints
8-
--> $DIR/issue-52213.rs:13:11
8+
--> $DIR/issue-52213.rs:13:20
99
|
1010
LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
1111
| -- -- lifetime `'b` defined here
1212
| |
1313
| lifetime `'a` defined here
1414
LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime
1515
LL | ((u,),) => u,
16-
| ^ requires that `'a` must outlive `'b`
16+
| ^ returning this value requires that `'a` must outlive `'b`
1717

1818
error: aborting due to previous error
1919

src/test/ui/issues/issue-52533-1.nll.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ error: unsatisfied lifetime constraints
88
--> $DIR/issue-52533-1.rs:19:18
99
|
1010
LL | gimme(|x, y| y)
11-
| - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
11+
| - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
1212
| | |
1313
| | has type `&Foo<'_, '1, u32>`
1414
| has type `&Foo<'_, '2, u32>`

0 commit comments

Comments
 (0)