Skip to content

Commit b4e2c4e

Browse files
committed
Change stderr
1 parent d31dd80 commit b4e2c4e

13 files changed

+48
-45
lines changed

src/test/ui/async-await/issue-70935-complex-spans.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ LL | | foo(tx.clone());
1313
LL | | }).await;
1414
| |________________^ first, await occurs here, with the value maybe used later...
1515
note: the value is later dropped here
16-
--> $DIR/issue-70935-complex-spans.rs:15:17
16+
--> $DIR/issue-70935-complex-spans.rs:15:16
1717
|
1818
LL | }).await;
19-
| ^
19+
| ^
2020
note: this has type `[closure@$DIR/issue-70935-complex-spans.rs:13:13: 15:10]` which is not `Send`
2121
--> $DIR/issue-70935-complex-spans.rs:13:13
2222
|

src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ note: future is not `Send` as this value is used across an await
1414
LL | bar(Foo(std::ptr::null())).await;
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ first, await occurs here, with `std::ptr::null()` maybe used later...
1616
note: `std::ptr::null()` is later dropped here
17-
--> $DIR/issue-65436-raw-ptr-not-send.rs:14:41
17+
--> $DIR/issue-65436-raw-ptr-not-send.rs:14:40
1818
|
1919
LL | bar(Foo(std::ptr::null())).await;
20-
| ---------------- ^
20+
| ---------------- ^
2121
| |
2222
| has type `*const u8` which is not `Send`
2323
help: consider moving this into a `let` binding to create a shorter lived borrow

src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0716]: temporary value dropped while borrowed
22
--> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:28
33
|
44
LL | buggy_map.insert(42, &*Box::new(1));
5-
| ^^^^^^^^^^^ - temporary value is freed at the end of this statement
5+
| ^^^^^^^^^^^- temporary value is freed at the end of this statement
66
| |
77
| creates a temporary which is freed while still in use
88
...

src/test/ui/borrowck/issue-17545.stderr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ LL | / bar.call((
77
LL | | &id(()),
88
| | ^^^^^^ creates a temporary which is freed while still in use
99
LL | | ));
10-
| | -- temporary value is freed at the end of this statement
11-
| |______|
10+
| | -
11+
| | |
12+
| |______temporary value is freed at the end of this statement
1213
| argument requires that borrow lasts for `'a`
1314

1415
error: aborting due to previous error

src/test/ui/issues/issue-47646.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | println!("{:?}", heap);
1111
| ^^^^ immutable borrow occurs here
1212
...
1313
LL | };
14-
| - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(Option<PeekMut<'_, i32>>, ())`
14+
| - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(Option<PeekMut<'_, i32>>, ())`
1515

1616
error: aborting due to previous error
1717

src/test/ui/loops/loop-no-implicit-break.stderr

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,17 @@ error[E0308]: mismatched types
33
|
44
LL | 1
55
| ^ expected `()`, found integer
6-
|
7-
help: you might have meant to break the loop with this value
8-
|
9-
LL | break 1;
10-
| +++++ +
116

127
error[E0308]: mismatched types
138
--> $DIR/loop-no-implicit-break.rs:13:9
149
|
1510
LL | 1
1611
| ^ expected `()`, found integer
1712
|
18-
help: you might have meant to break the loop with this value
13+
help: you might have meant to return this value
1914
|
20-
LL | break 1;
21-
| +++++ +
15+
LL | return 1;
16+
| ++++++ +
2217

2318
error[E0308]: mismatched types
2419
--> $DIR/loop-no-implicit-break.rs:21:9

src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ LL | D("other").next(&_thing1)
88
| a temporary with access to the borrow is created here ...
99
...
1010
LL | }
11-
| - `_thing1` dropped here while still borrowed
12-
LL |
13-
LL | ;
14-
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
11+
| -
12+
| |
13+
| `_thing1` dropped here while still borrowed
14+
| ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
1515
|
1616
help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
1717
|

src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ LL | D(&_thing1).end()
77
| | borrowed value does not live long enough
88
| a temporary with access to the borrow is created here ...
99
LL | }
10-
| - `_thing1` dropped here while still borrowed
11-
LL |
12-
LL | ;
13-
| - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
10+
| -
11+
| |
12+
| `_thing1` dropped here while still borrowed
13+
| ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
1414
|
1515
help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
1616
|

src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ error[E0597]: `_t1` does not live long enough
22
--> $DIR/issue-54556-used-vs-unused-tails.rs:10:55
33
|
44
LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;`
5-
| --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
5+
| --^^^^- -
66
| | | |
77
| | | `_t1` dropped here while still borrowed
8+
| | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
89
| | borrowed value does not live long enough
910
| a temporary with access to the borrow is created here ...
1011
|
@@ -17,7 +18,7 @@ error[E0597]: `_t1` does not live long enough
1718
--> $DIR/issue-54556-used-vs-unused-tails.rs:13:55
1819
|
1920
LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } } ; // suggest `;`
20-
| --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
21+
| --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
2122
| | | |
2223
| | | `_t1` dropped here while still borrowed
2324
| | borrowed value does not live long enough
@@ -32,9 +33,10 @@ error[E0597]: `_t1` does not live long enough
3233
--> $DIR/issue-54556-used-vs-unused-tails.rs:16:55
3334
|
3435
LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; } // suggest `;`
35-
| --^^^^- -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
36+
| --^^^^- -
3637
| | | |
3738
| | | `_t1` dropped here while still borrowed
39+
| | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
3840
| | borrowed value does not live long enough
3941
| a temporary with access to the borrow is created here ...
4042
|
@@ -94,9 +96,10 @@ error[E0597]: `_t1` does not live long enough
9496
--> $DIR/issue-54556-used-vs-unused-tails.rs:30:55
9597
|
9698
LL | _y = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x`
97-
| --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
99+
| --^^^^- -
98100
| | | |
99101
| | | `_t1` dropped here while still borrowed
102+
| | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D`
100103
| | borrowed value does not live long enough
101104
| a temporary with access to the borrow is created here ...
102105
|

src/test/ui/regions/regions-var-type-out-of-scope.stderr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ error[E0716]: temporary value dropped while borrowed
22
--> $DIR/regions-var-type-out-of-scope.rs:9:14
33
|
44
LL | x = &id(3);
5-
| ^^^^^- temporary value is freed at the end of this statement
6-
| |
5+
| ^^^^-
6+
| | |
7+
| | temporary value is freed at the end of this statement
78
| creates a temporary which is freed while still in use
89
LL | assert_eq!(*x, 3);
910
| ------------------ borrow later used here

0 commit comments

Comments
 (0)