rust/compiler/rustc_middle
Stuart Cook 69f0a498ba
Rollup merge of #151103 - array-pat-len, r=Nadrieril,petrochenkov
mir_build: Simplify length-determination and indexing for array/slice patterns

The existing length-determination code in `prefix_slice_suffix` has ended up overly complicated, partly because it doesn't know in advance whether the pattern is supposed to be an array pattern or a slice pattern.

Pulling most of that step out into the `PatKind::Array` arm makes the whole thing a bit nicer overall.

There should (hopefully) be no change to compiler output. The biggest “functional” change is that we now discard the subpatterns of an array pattern of unknowable length, instead of treating it as a slice pattern. I'm not aware of any way for this to make an observable difference, and it can only occur when compilation is already doomed to fail.
2026-01-15 21:39:03 +11:00
..
src Rollup merge of #151103 - array-pat-len, r=Nadrieril,petrochenkov 2026-01-15 21:39:03 +11:00
Cargo.toml Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00
messages.ftl change flt back to ftl 2025-10-04 18:18:58 +00:00
README.md

For more information about how rustc works, see the rustc dev guide.