Skip to content

Commit 539404b

Browse files
committed
Update output for borrowck=migrate compare mode.
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
1 parent 8b34881 commit 539404b

File tree

204 files changed

+920
-2958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+920
-2958
lines changed

src/test/ui/access-mode-in-closures.nll.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ note: move occurs because `v` has type `std::vec::Vec<isize>`, which does not im
1313
LL | match *s { sty(v) => v } //~ ERROR cannot move out
1414
| ^
1515

16-
error: aborting due to previous error
16+
error[E0507]: cannot move out of `s.0` which is behind a `&` reference
17+
--> $DIR/access-mode-in-closures.rs:19:24
18+
|
19+
LL | let _foo = unpack(|s| {
20+
| - help: consider changing this to be a mutable reference: `&mut sty`
21+
LL | // Test that `s` is moved here.
22+
LL | match *s { sty(v) => v } //~ ERROR cannot move out
23+
| ^
24+
| |
25+
| cannot move out of `s.0` which is behind a `&` reference
26+
| `s` is a `&` reference, so the data it refers to cannot be moved
27+
28+
error: aborting due to 2 previous errors
1729

1830
For more information about this error, try `rustc --explain E0507`.

src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/test/ui/binop/binop-move-semantics.nll.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ error[E0507]: cannot move out of borrowed content
3232
LL | *n; //~ ERROR: cannot move out of borrowed content
3333
| ^^ cannot move out of borrowed content
3434

35+
error[E0507]: cannot move out of `*n` which is behind a `&` reference
36+
--> $DIR/binop-move-semantics.rs:42:5
37+
|
38+
LL | let n = &y;
39+
| -- help: consider changing this to be a mutable reference: `&mut y`
40+
...
41+
LL | *n; //~ ERROR: cannot move out of borrowed content
42+
| ^^
43+
| |
44+
| cannot move out of `*n` which is behind a `&` reference
45+
| `n` is a `&` reference, so the data it refers to cannot be moved
46+
3547
error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
3648
--> $DIR/binop-move-semantics.rs:64:5
3749
|
@@ -62,7 +74,7 @@ LL | | &mut f; //~ ERROR: cannot borrow `f` as mutable because it is also b
6274
| | immutable borrow later used here
6375
| mutable borrow occurs here
6476

65-
error: aborting due to 6 previous errors
77+
error: aborting due to 7 previous errors
6678

6779
Some errors occurred: E0382, E0502, E0507.
6880
For more information about an error, try `rustc --explain E0382`.

src/test/ui/borrowck/borrowck-closures-unique.nll.stderr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,19 @@ LL | let c2 = || set(x); //~ ERROR two closures require unique access to `x`
4040
LL | c1;
4141
| -- first borrow later used here
4242

43-
error[E0594]: cannot assign to `x`, as it is not declared as mutable
43+
warning[E0594]: cannot assign to `x`, as it is not declared as mutable
4444
--> $DIR/borrowck-closures-unique.rs:57:38
4545
|
4646
LL | fn e(x: &'static mut isize) {
4747
| - help: consider changing this to be mutable: `mut x`
4848
LL | let c1 = |y: &'static mut isize| x = y; //~ ERROR closure cannot assign to immutable argument
4949
| ^^^^^ cannot assign
50+
|
51+
= warning: This error has been downgraded to a warning for backwards compatibility with previous releases.
52+
It represents potential unsoundness in your code.
53+
This warning will become a hard error in the future.
5054

51-
error: aborting due to 4 previous errors
55+
error: aborting due to 3 previous errors
5256

5357
Some errors occurred: E0500, E0524, E0594.
5458
For more information about an error, try `rustc --explain E0500`.

0 commit comments

Comments
 (0)