Fix various cases with unused imports#5104
Merged
Merged
Conversation
Contributor
|
@alexcrichton - do you mind rebasing and re-submitting? Sorry! |
Member
Author
|
No problem, I just rebased on mozilla's incoming |
bors
added a commit
that referenced
this pull request
Feb 26, 2013
…morphism The first commit fixes warnings about `pub use` imports because it can't be known whether those are actually used or not. The second commit fixes using `#[level(unused_imports)]` style control over the emission of warnings. Before it looked like it only worked as a command-line flag.
bors
added a commit
that referenced
this pull request
Feb 28, 2013
The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler. The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules. There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed. I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2020
Rustup to rust-lang#68512 changelog: none
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.
The first commit fixes warnings about
pub useimports because it can't be known whether those are actually used or not.The second commit fixes using
#[level(unused_imports)]style control over the emission of warnings. Before it looked like it only worked as a command-line flag.