Uh oh!
There was an error while loading. Please reload this page.
Check type of fields when struct is matched against enum-like pattern - #5055
Closed
youknowone wants to merge 2 commits into
Closed
Check type of fields when struct is matched against enum-like pattern#5055youknowone wants to merge 2 commits into
youknowone wants to merge 2 commits into
Conversation
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.
Try field type pattern check instead of ad-hoc type check. Fixrust-lang#4849
youknowone
commented
Feb 20, 2013
ContributorAuthor
I attached a patch to #5046 |
youknowone
commented
Feb 21, 2013
ContributorAuthor
I think @bors recognized wrong approval. Should I close this pull request and waiting for sanxyin's one to be merged first? |
sanxiyn
commented
Feb 21, 2013
Contributor
Do you have a test case for which new codes are needed? |
youknowone
commented
Feb 21, 2013
ContributorAuthor
I didn't found any case. I just tried similar implementation pattern as like other type nodes of match. |
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2020
…tor-import, r=llogiq Fix new lint generator import Fix `rustc_lint` import path and add lifetimes to `LateLintPass` in `new_lint` command. changelog: none
RalfJung added a commit
to RalfJung/rust
that referenced
this pull request
May 27, 2026
as_mut_ptr test update description
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 freeto 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.
Try field type pattern check instead of ad-hoc type check.
Fix#4849