Rollup merge of #45967 - matthewjasper:array-move-types, r=arielb1
MIR-borrowck: don't ICE for cannot move from array error Closes #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 ```
Showing
想要评论请 注册 或 登录