Skip to content
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

Improve detection of unused imports (fixes #30078) #30325

Merged
merged 2 commits into from
Dec 17, 2015

Conversation

jseyfried
Copy link
Contributor

This fixes a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in resolve_path (issue #30078), and it removes unused imports that were previously undetected because of the bug.

@rust-highfive
Copy link
Collaborator

r? @jroesch

(rust_highfive has picked a reviewer for you, use r? to override)

@sanxiyn
Copy link
Member

sanxiyn commented Dec 11, 2015

Travis failed because of new unused_imports warnings.

@jseyfried jseyfried force-pushed the fixes_30078 branch 4 times, most recently from 797acf3 to 9a88b11 Compare December 11, 2015 14:03
@alexcrichton
Copy link
Member

Awesome! Could you also expand the commit message to include information like:

  • What bug is being fixed (e.g. not just the bug number)
  • How the bug was fixed
  • What the expected fallout is

r? @nrc (looking at other resolve changes lately as well)

@rust-highfive rust-highfive assigned nrc and unassigned jroesch Dec 11, 2015
@jseyfried jseyfried force-pushed the fixes_30078 branch 9 times, most recently from 3651c06 to 83dde14 Compare December 12, 2015 08:03
@nrc
Copy link
Member

nrc commented Dec 15, 2015

r+ with the changes to the commit message that @alexcrichton requested

@sanxiyn
Copy link
Member

sanxiyn commented Dec 15, 2015

Eh, isn't the commit message already changed?

@nrc
Copy link
Member

nrc commented Dec 15, 2015

@bors: r+

(ah yeah, I think I needed to refresh my browser)

@bors
Copy link
Contributor

bors commented Dec 15, 2015

📌 Commit 83dde14 has been approved by nrc

Manishearth added a commit to Manishearth/rust that referenced this pull request Dec 16, 2015
This fixes a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in `resolve_path` (issue rust-lang#30078), and it removes unused imports that were previously undetected because of the bug.
@bors
Copy link
Contributor

bors commented Dec 16, 2015

☔ The latest upstream changes (presumably #30300) made this pull request unmergeable. Please resolve the merge conflicts.

@jseyfried jseyfried changed the title Fixes #30078 Improve detection of unused imports (fixes #30078) Dec 17, 2015
@jseyfried
Copy link
Contributor Author

@nrc rebased

@nrc
Copy link
Member

nrc commented Dec 17, 2015

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 17, 2015

📌 Commit ba20a86 has been approved by nrc

@bors
Copy link
Contributor

bors commented Dec 17, 2015

⌛ Testing commit ba20a86 with merge 6734dcc...

bors added a commit that referenced this pull request Dec 17, 2015
This fixes a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in `resolve_path` (issue #30078), and it removes unused imports that were previously undetected because of the bug.
@bors bors merged commit ba20a86 into rust-lang:master Dec 17, 2015
bors added a commit that referenced this pull request Feb 5, 2016
The first commit improves detection of unused imports -- it should have been part of #30325. Right now, the unused import in the changed test would not be reported.

The rest of the commits are miscellaneous, independent clean-ups in resolve that I didn't think warranted individual PRs.

r? @nrc
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.

7 participants