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

src/test/ui/span/borrowck-let-suggestion-suffixes.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ error[E0716]: temporary value dropped while borrowed
1414
--> $DIR/borrowck-let-suggestion-suffixes.rs:19:14
1515
|
1616
LL | v3.push(&id('x')); // statement 6
17-
| ^^^^^^^ - temporary value is freed at the end of this statement
17+
| ^^^^^^^- temporary value is freed at the end of this statement
1818
| |
1919
| creates a temporary which is freed while still in use
2020
...
@@ -27,7 +27,7 @@ error[E0716]: temporary value dropped while borrowed
2727
--> $DIR/borrowck-let-suggestion-suffixes.rs:29:18
2828
|
2929
LL | v4.push(&id('y'));
30-
| ^^^^^^^ - temporary value is freed at the end of this statement
30+
| ^^^^^^^- temporary value is freed at the end of this statement
3131
| |
3232
| creates a temporary which is freed while still in use
3333
...
@@ -40,7 +40,7 @@ error[E0716]: temporary value dropped while borrowed
4040
--> $DIR/borrowck-let-suggestion-suffixes.rs:40:14
4141
|
4242
LL | v5.push(&id('z'));
43-
| ^^^^^^^ - temporary value is freed at the end of this statement
43+
| ^^^^^^^- temporary value is freed at the end of this statement
4444
| |
4545
| creates a temporary which is freed while still in use
4646
...

src/test/ui/static/static-reference-to-fn-2.stderr

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ error[E0716]: temporary value dropped while borrowed
44
LL | fn state1(self_: &mut StateMachineIter) -> Option<&'static str> {
55
| ----- has type `&mut StateMachineIter<'1>`
66
LL | self_.statefn = &id(state2 as StateMachineFunc);
7-
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
8-
| | |
7+
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
8+
| | | |
9+
| | | temporary value is freed at the end of this statement
910
| | creates a temporary which is freed while still in use
1011
| assignment requires that borrow lasts for `'1`
1112

@@ -15,8 +16,9 @@ error[E0716]: temporary value dropped while borrowed
1516
LL | fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> {
1617
| ----- has type `&mut StateMachineIter<'1>`
1718
LL | self_.statefn = &id(state3 as StateMachineFunc);
18-
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
19-
| | |
19+
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
20+
| | | |
21+
| | | temporary value is freed at the end of this statement
2022
| | creates a temporary which is freed while still in use
2123
| assignment requires that borrow lasts for `'1`
2224

@@ -26,8 +28,9 @@ error[E0716]: temporary value dropped while borrowed
2628
LL | fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> {
2729
| ----- has type `&mut StateMachineIter<'1>`
2830
LL | self_.statefn = &id(finished as StateMachineFunc);
29-
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement
30-
| | |
31+
| -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
32+
| | | |
33+
| | | temporary value is freed at the end of this statement
3134
| | creates a temporary which is freed while still in use
3235
| assignment requires that borrow lasts for `'1`
3336

src/test/ui/thir-tree.stdout

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Thir {
55
Expr {
66
ty: (),
77
temp_lifetime: Some(
8-
Node(2),
8+
Node(2, false),
99
),
1010
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
1111
kind: Block {
1212
body: Block {
1313
targeted_by_break: false,
14-
region_scope: Node(1),
14+
region_scope: Node(1, false),
1515
opt_destruction_scope: None,
1616
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
1717
stmts: [],
@@ -23,11 +23,11 @@ Thir {
2323
Expr {
2424
ty: (),
2525
temp_lifetime: Some(
26-
Node(2),
26+
Node(2, false),
2727
),
2828
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
2929
kind: Scope {
30-
region_scope: Node(2),
30+
region_scope: Node(2, false),
3131
lint_level: Explicit(
3232
HirId {
3333
owner: DefId(0:3 ~ thir_tree[348d]::main),
@@ -40,11 +40,11 @@ Thir {
4040
Expr {
4141
ty: (),
4242
temp_lifetime: Some(
43-
Node(2),
43+
Node(2, false),
4444
),
4545
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
4646
kind: Scope {
47-
region_scope: Destruction(2),
47+
region_scope: Destruction(2, false),
4848
lint_level: Inherited,
4949
value: e1,
5050
},

0 commit comments

Comments
 (0)