-
Notifications
You must be signed in to change notification settings - Fork 74
replace box_patterns in the compiler with deref_patterns #984
Copy link
Copy link
Closed
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was acceptedto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Metadata
Metadata
Assignees
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was acceptedto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.