-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #55134 - davidtwco:issue-55118, r=pnkfelix
NLL: change compare-mode=nll to use borrowck=migrate Fixes #55118. This PR is split into two parts: The first commit is a minor change that fixes a flaw in the existing `borrowck=migrate` implementation whereby a lint that was promoted to an error in the AST borrow checker would result in the same lint from the NLL borrow checker being downgraded to a warning in migrate mode. This PR fixes this by ensuring lints are exempt from buffering in the NLL borrow checker. The second commit updates `compiletest` to make the NLL compare mode use `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The third commit shows all the test output changes that result from this. r? @pnkfelix
- Loading branch information
Showing
206 changed files
with
928 additions
and
2,966 deletions.
There are no files selected for viewing
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
24 changes: 0 additions & 24 deletions
24
src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
src/test/ui/borrowck/borrowck-fn-in-const-a.ast.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error[E0507]: cannot move out of borrowed content | ||
--> $DIR/borrowck-fn-in-const-a.rs:19:16 | ||
| | ||
LL | return *x //[ast]~ ERROR cannot move out of borrowed content [E0507] | ||
| ^^ cannot move out of borrowed content | ||
|
||
error[E0507]: cannot move out of `*x` which is behind a `&` reference | ||
--> $DIR/borrowck-fn-in-const-a.rs:19:16 | ||
| | ||
LL | fn broken(x: &String) -> String { | ||
| ------- help: consider changing this to be a mutable reference: `&mut std::string::String` | ||
LL | return *x //[ast]~ ERROR cannot move out of borrowed content [E0507] | ||
| ^^ | ||
| | | ||
| cannot move out of `*x` which is behind a `&` reference | ||
| `x` is a `&` reference, so the data it refers to cannot be moved | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0507`. |
Oops, something went wrong.