mir_build: Prefer exhaustive destructuring in MatchPairTree::for_pattern#150686
Closed
Zalathar wants to merge 1 commit intorust-lang:mainfrom
Closed
mir_build: Prefer exhaustive destructuring in MatchPairTree::for_pattern#150686Zalathar wants to merge 1 commit intorust-lang:mainfrom
MatchPairTree::for_pattern#150686Zalathar wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
Some changes occurred in match lowering cc @Nadrieril |
Collaborator
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
Member
|
I dunno, I find this kind of thing adds more friction than help... If I add a field to an enum like this it's always only going to get used at one or two use sites. |
Member
Author
|
Hmm, you might be right. This is not a big deal either way, so I'm happy to close. |
Member
|
My preference would be to leave things as-is yea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a bit more verbose, but clearly indicates which variant fields are being ignored, which is helpful for this sort of exhaustive lowering step.
Inspired by #150681 (comment).
There should be no change to compiler behaviour.