Skip to content

Fix some dead-code pass bugs #10870

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

Merged
merged 3 commits into from
Dec 14, 2013
Merged

Fix some dead-code pass bugs #10870

merged 3 commits into from
Dec 14, 2013

Conversation

ktt3ja
Copy link
Contributor

@ktt3ja ktt3ja commented Dec 9, 2013

Fix #10865 and #10939.

@alexcrichton
Copy link
Member

Special casing on an arm is a little too special-casing for me. This has nothing to do with arms of a match, but rather something which can show up in patterns.

I believe the correct solution for this is in #10862 where a visit_path method was added. The real bug here is that paths in patterns aren't being matched, not that patterns in arms aren't being matched. For now, let's wait for the outcome of #10862 and then rebase this on top of that (and override visit_path in the visitor).

I'd also be fine if you wanted to rebase that patch in this PR and I'll r+ this one as soon as that one gets r+'d (to get the rebase conflicts out of the way sooner).

@alexcrichton
Copy link
Member

Now that my PR has landed, this should be ready for a rebase.

@ktt3ja
Copy link
Contributor Author

ktt3ja commented Dec 11, 2013

I'll get on it on Wednesday after my exam.

@ktt3ja
Copy link
Contributor Author

ktt3ja commented Dec 12, 2013

@alexcrichton: r?

bors added a commit that referenced this pull request Dec 12, 2013
bors added a commit that referenced this pull request Dec 14, 2013
@bors bors merged commit a67b886 into rust-lang:master Dec 14, 2013
@ktt3ja ktt3ja deleted the issue-10865 branch December 15, 2013 04:41
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.

Dead code check false positive for static used in match
3 participants