Proposal
A lot of types in the compiler are wrapped in Boxes. To make matching on them more ergonomic, the box_patterns (tracking issue) feature is used at the moment. The current plan for this feature is that it will not be stabilized; instead, deref_patterns (tracking issue) supersedes it.
I propose to replace the usage of box_patterns in the compiler with deref_patterns. This has several advantages:
- It makes it possible to remove
box_patterns entirely in the future
- It removes the need for using the weird
box keyword in the compiler, making the code slightly easier to read
- We might find possible bugs in the
deref_patterns implementation by using it in practice
The feature was previously moved from incomplete to unstable in rust-lang/rust#153053.
Mentors or Reviewers
I am willing to create the PRs that update the affected compiler crates to use the newer feature.
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Proposal
A lot of types in the compiler are wrapped in
Boxes. To make matching on them more ergonomic, thebox_patterns(tracking issue) feature is used at the moment. The current plan for this feature is that it will not be stabilized; instead,deref_patterns(tracking issue) supersedes it.I propose to replace the usage of
box_patternsin the compiler withderef_patterns. This has several advantages:box_patternsentirely in the futureboxkeyword in the compiler, making the code slightly easier to readderef_patternsimplementation by using it in practiceThe feature was previously moved from
incompletetounstablein rust-lang/rust#153053.Mentors or Reviewers
I am willing to create the PRs that update the affected compiler crates to use the newer feature.
Process
The main points of the Major Change Process are as follows:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.