MIR-borrowck: Some minor fixes#46040
Merged
bors merged 3 commits intorust-lang:masterfrom Nov 22, 2017
Merged
Conversation
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 4beca6a has been approved by |
Collaborator
|
⌛ Testing commit 4beca6aad36086532078c205e97dad9d8526272e with merge 98e3158b7619099a2debf23ba36fa43af16e8f86... |
Member
Collaborator
|
⌛ Testing commit 4beca6aad36086532078c205e97dad9d8526272e with merge 99559815fe2011b10892b9666aa4fbea548ddff3... |
Collaborator
|
💔 Test failed - status-travis |
Member
|
UI test failure in Details error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
--> $DIR/get_default.rs:33:17
|
28 | match map.get() {
| --- immutable borrow occurs here
...
33 | map.set(String::new()); // Just AST errors here
| ^^^ mutable borrow occurs here
...
37 | }
| - immutable borrow ends here
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
--> $DIR/get_default.rs:43:17
|
41 | match map.get() {
| --- immutable borrow occurs here
42 | Some(v) => {
43 | map.set(String::new()); // Both AST and MIR error here
| ^^^ mutable borrow occurs here
...
51 | }
| - immutable borrow ends here
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
--> $DIR/get_default.rs:47:17
|
41 | match map.get() {
| --- immutable borrow occurs here
...
47 | map.set(String::new()); // Just AST errors here
| ^^^ mutable borrow occurs here
...
51 | }
| - immutable borrow ends here
-error[E0502]: cannot borrow `(*map)` as mutable because it is also borrowed as immutable (Mir)
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
--> $DIR/get_default.rs:43:17
|
41 | match map.get() {
| --- immutable borrow occurs here
42 | Some(v) => {
43 | map.set(String::new()); // Both AST and MIR error here
| ^^^ mutable borrow occurs here
error: aborting due to 4 previous errors |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 2285e35 has been approved by |
Collaborator
bors
added a commit
that referenced
this pull request
Nov 22, 2017
MIR-borrowck: Some minor fixes - Remove parens when printing dereference (fix #45185) - Change argument type of `autoderef` to `bool` - Change argument type of `field_index` to `Field`
Collaborator
|
☀️ Test successful - status-appveyor, status-travis |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
autodereftoboolfield_indextoField