Skip to content

Check type of fields when struct is matched against enum-like pattern #5055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

youknowone
Copy link
Contributor

Try field type pattern check instead of ad-hoc type check.
Fix #4849

sanxiyn and others added 2 commits February 20, 2013 02:44
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.
Fix rust-lang#4849
@youknowone
Copy link
Contributor Author

I attached a patch to #5046

@youknowone
Copy link
Contributor Author

I think @bors recognized wrong approval. Should I close this pull request and waiting for sanxyin's one to be merged first?

@sanxiyn
Copy link
Member

sanxiyn commented Feb 21, 2013

Do you have a test case for which new codes are needed?

@youknowone
Copy link
Contributor Author

I didn't found any case. I just tried similar implementation pattern as like other type nodes of match.

@youknowone youknowone closed this Feb 24, 2013
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
@youknowone youknowone deleted the struct-match branch December 2, 2022 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants