-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the expected error output to reflect changes in this PR.
- Loading branch information
Showing
3 changed files
with
63 additions
and
38 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
error[E0508]: cannot move out of type `[Foo]`, a non-copy slice | ||
--> $DIR/borrowck-move-out-of-vec-tail.rs:30:33 | ||
| | ||
LL | &[Foo { string: a }, | ||
| ^ cannot move out of borrowed content | ||
| ^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
error[E0508]: cannot move out of type `[Foo]`, a non-copy slice | ||
--> $DIR/borrowck-move-out-of-vec-tail.rs:34:33 | ||
| | ||
LL | Foo { string: b }] => { | ||
| ^ cannot move out of borrowed content | ||
| ^ cannot move out of here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0507`. | ||
For more information about this error, try `rustc --explain E0508`. |
77 changes: 51 additions & 26 deletions
77
src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,76 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:42:15 | ||
error[E0506]: cannot assign to `vec[..]` because it is borrowed | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:20:13 | ||
| | ||
LL | [box ref _a, _, _] => { | ||
| ------ borrow of `vec[..]` occurs here | ||
LL | //~^ borrow of `vec[..]` occurs here | ||
LL | vec[0] = box 4; //~ ERROR cannot assign | ||
| ^^^^^^ assignment to borrowed `vec[..]` occurs here | ||
LL | //~^ assignment to borrowed `vec[..]` occurs here | ||
LL | _a.use_ref(); | ||
| -- borrow later used here | ||
|
||
error[E0506]: cannot assign to `vec[..]` because it is borrowed | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:33:13 | ||
| | ||
LL | &mut [ref _b..] => { | ||
| ------ borrow of `vec[..]` occurs here | ||
LL | //~^ borrow of `vec[..]` occurs here | ||
LL | vec[0] = box 4; //~ ERROR cannot assign | ||
| ^^^^^^ assignment to borrowed `vec[..]` occurs here | ||
LL | //~^ assignment to borrowed `vec[..]` occurs here | ||
LL | _b.use_ref(); | ||
| -- borrow later used here | ||
|
||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:44:15 | ||
| | ||
LL | &mut [_a, //~ ERROR cannot move out | ||
| ^^ cannot move out of borrowed content | ||
| ^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:55:13 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:57:13 | ||
| | ||
LL | let a = vec[0]; //~ ERROR cannot move out | ||
| ^^^^^^ cannot move out of borrowed content | ||
| ^^^^^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:65:10 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:67:10 | ||
| | ||
LL | _b] => {} | ||
| ^^ cannot move out of borrowed content | ||
| ^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:68:13 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:70:13 | ||
| | ||
LL | let a = vec[0]; //~ ERROR cannot move out | ||
| ^^^^^^ cannot move out of borrowed content | ||
| ^^^^^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:76:15 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:78:15 | ||
| | ||
LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ||
| ^^ cannot move out of borrowed content | ||
| ^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:76:19 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:78:19 | ||
| | ||
LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ||
| ^^ cannot move out of borrowed content | ||
| ^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:76:23 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:78:23 | ||
| | ||
LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out | ||
| ^^ cannot move out of borrowed content | ||
| ^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:80:13 | ||
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice | ||
--> $DIR/borrowck-vec-pattern-nesting.rs:82:13 | ||
| | ||
LL | let a = vec[0]; //~ ERROR cannot move out | ||
| ^^^^^^ cannot move out of borrowed content | ||
| ^^^^^^ cannot move out of here | ||
|
||
error: aborting due to 8 previous errors | ||
error: aborting due to 10 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0507`. | ||
Some errors occurred: E0506, E0508. | ||
For more information about an error, try `rustc --explain E0506`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters