-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporate edition flag testing into tests of
-Z borrowck=migrate
.
- Loading branch information
Showing
6 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...owck-feature-nll-overrides-migrate.stderr → ...ture-nll-overrides-migrate.edition.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
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
9 changes: 9 additions & 0 deletions
9
src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.zflag.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-feature-nll-overrides-migrate.rs:32:17 | ||
| | ||
LL | (|| { let bar = foo; bar.take() })(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0507`. |
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
warning[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-migrate-to-nll.rs:35:17 | ||
| | ||
LL | (|| { let bar = foo; bar.take() })(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content | ||
| | ||
= warning: This error has been downgraded to a warning for backwards compatibility with previous releases. | ||
It represents potential unsoundness in your code. | ||
This warning will become a hard error in the future. | ||
|
||
warning[E0507]: cannot move out of `foo`, as it is immutable for the pattern guard | ||
--> $DIR/borrowck-migrate-to-nll.rs:35:17 | ||
| | ||
LL | (|| { let bar = foo; bar.take() })(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| cannot move out of `foo`, as it is immutable for the pattern guard | ||
| cannot move | ||
| | ||
= note: variables bound in patterns are immutable until the end of the pattern guard | ||
= warning: This error has been downgraded to a warning for backwards compatibility with previous releases. | ||
It represents potential unsoundness in your code. | ||
This warning will become a hard error in the future. | ||
|