-
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.
Remove mutable_borrow_reservation_conflict lint
- 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.