Files
rust/compiler
Yuki Okushi 0d9a6edb50 Rollup merge of #82789 - csmoe:issue-82772, r=estebank
Get with field index from pattern slice instead of directly indexing

Closes #82772
r? ``@estebank``

https://github.com/rust-lang/rust/pull/82789#issuecomment-796921977
> ``@estebank`` So the real cause is we only generate single pattern for Box here
https://github.com/csmoe/rust/blob/615b03aeaa8ce9819de7828740ab3cd7def4fa76/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs#L1130-L1132
But in the replacing function, it tries to index on the 1-length pattern slice with field 1, thus out of bounds.
https://github.com/csmoe/rust/blob/615b03aeaa8ce9819de7828740ab3cd7def4fa76/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs#L1346
2021-03-14 13:07:31 +09:00
..
2021-02-14 18:03:11 +03:00
2021-02-20 17:19:30 -05:00
2021-03-11 12:24:43 +01:00
2021-03-09 19:27:50 +01:00
2021-02-21 12:22:22 +01:00
2021-03-03 11:22:44 +01:00