-
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.
Auto merge of #96268 - jackh726:remove-mutable_borrow_reservation_con…
…flict-lint, r=nikomatsakis Remove mutable_borrow_reservation_conflict lint and allow the code pattern This was the only breaking issue with the NLL stabilization PR. Lang team decided to go ahead and allow this. r? `@nikomatsakis` Closes #59159 Closes #56254
- Loading branch information
Showing
21 changed files
with
89 additions
and
380 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
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
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
25 changes: 25 additions & 0 deletions
25
src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.base.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,25 @@ | ||
error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable | ||
--> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 | ||
| | ||
LL | let shared = &v; | ||
| -- immutable borrow occurs here | ||
LL | | ||
LL | v.extend(shared); | ||
| ^^------^^^^^^^^ | ||
| | | | ||
| | immutable borrow later used by call | ||
| mutable borrow occurs here | ||
|
||
error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable | ||
--> $DIR/two-phase-reservation-sharing-interference-2.rs:27:5 | ||
| | ||
LL | v.extend(&v); | ||
| ^^------^--^ | ||
| | | | | ||
| | | immutable borrow occurs here | ||
| | immutable borrow later used by call | ||
| mutable borrow occurs here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
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
25 changes: 25 additions & 0 deletions
25
src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.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,25 @@ | ||
error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable | ||
--> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 | ||
| | ||
LL | let shared = &v; | ||
| -- immutable borrow occurs here | ||
LL | | ||
LL | v.extend(shared); | ||
| ^^------^^^^^^^^ | ||
| | | | ||
| | immutable borrow later used by call | ||
| mutable borrow occurs here | ||
|
||
error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable | ||
--> $DIR/two-phase-reservation-sharing-interference-2.rs:27:5 | ||
| | ||
LL | v.extend(&v); | ||
| ^^------^--^ | ||
| | | | | ||
| | | immutable borrow occurs here | ||
| | immutable borrow later used by call | ||
| mutable borrow occurs here | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
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
Oops, something went wrong.