-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refuse to downgrade NLL errors on Rust >= 2018.
- Loading branch information
Showing
4 changed files
with
15 additions
and
11 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
13 changes: 6 additions & 7 deletions
13
src/test/ui/borrowck/borrowck-migrate-to-nll.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
warning[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable | ||
--> $DIR/borrowck-migrate-to-nll.rs:28:21 | ||
error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable | ||
--> $DIR/borrowck-migrate-to-nll.rs:29:21 | ||
| | ||
LL | let x = &mut block; | ||
| ---------- mutable borrow occurs here | ||
LL | let p: &'a u8 = &*block.current; | ||
| ^^^^^^^^^^^^^^^ immutable borrow occurs here | ||
LL | // (use `x` and `p` so enabling NLL doesn't assign overly short lifetimes) | ||
... | ||
LL | drop(x); | ||
| - mutable borrow later used here | ||
| | ||
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases | ||
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future | ||
= note: for more information, try `rustc --explain E0729` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0502`. |
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