Skip to content

MIR-borrowck: don't ICE for cannot move from array error - #45967

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:array-move-types
Nov 14, 2017
Merged

MIR-borrowck: don't ICE for cannot move from array error#45967
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:array-move-types

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor

Closes#45694
compile-fail test E0508 now gives

error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Ast)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^
| |
| cannot move out of here
| help: consider using a reference instead: `&array[0]`
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Mir)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^ cannot move out of here
error: aborting due to 2 previous errors

@kennytmkennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 14, 2017
@kennytm

Copy link
Copy Markdown
Member

r? @arielb1

@arielb1

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Nov 14, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit a6824f1 has been approved by arielb1

@kennytmkennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2017
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 14, 2017
…rielb1
MIR-borrowck: don't ICE for cannot move from array error
Closesrust-lang#45694
compile-fail test E0508 now gives
```text
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Ast)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^
| |
| cannot move out of here
| help: consider using a reference instead: `&array[0]`
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Mir)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^ cannot move out of here
error: aborting due to 2 previous errors
```
bors added a commit that referenced this pull request Nov 14, 2017
Rollup of 7 pull requests
- Successful merges: #45815, #45941, #45950, #45951, #45961, #45967, #45970
- Failed merges:
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 14, 2017
…rielb1
MIR-borrowck: don't ICE for cannot move from array error
Closesrust-lang#45694
compile-fail test E0508 now gives
```text
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Ast)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^
| |
| cannot move out of here
| help: consider using a reference instead: `&array[0]`
error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array (Mir)
--> .\src\test\compile-fail\E0508.rs:18:18
|
18 | let _value = array[0]; //[ast]~ ERROR E0508
| ^^^^^^^^ cannot move out of here
error: aborting due to 2 previous errors
```
bors added a commit that referenced this pull request Nov 14, 2017
Rollup of 7 pull requests
- Successful merges: #45815, #45941, #45950, #45961, #45967, #45970, #45977
- Failed merges:
@bors
bors merged commit a6824f1 into rust-lang:masterNov 14, 2017
@matthewjasper
matthewjasper deleted the array-move-types branch November 27, 2017 19:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@matthewjasper@kennytm@arielb1@bors