forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#45967 - matthewjasper:array-move-types, r=a…
…rielb1 MIR-borrowck: don't ICE for cannot move from array error Closes rust-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 ```
- Loading branch information
Showing
4 changed files
with
14 additions
and
12 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