-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Silence unused_imports
for redundant imports
#123744
Conversation
Yes, this PR as is doesn't cover redundant stdlib prelude imports, which are the largest source of regressions (they don't look like globs from other crates). I suggest just commenting out the |
unused_imports
if import comes from globunused_imports
for redundant imports
@rustbot ready Ok, just silenced the whole thing |
🤦 push didn't go through, one sec |
9934593
to
c40029e
Compare
This comment has been minimized.
This comment has been minimized.
c40029e
to
19d0226
Compare
This comment has been minimized.
This comment has been minimized.
19d0226
to
0db2a40
Compare
Ok, it's probably fine to land this on master as well. |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#122882 (Avoid a panic in `set_output_capture` in the default panic handler) - rust-lang#123523 (Account for trait/impl difference when suggesting changing argument from ref to mut ref) - rust-lang#123744 (Silence `unused_imports` for redundant imports) - rust-lang#123784 (Replace `document.write` with `document.head.insertAdjacent`) - rust-lang#123798 (Avoid invalid socket address in length calculation) - rust-lang#123804 (Stop using `HirId` for fn-like parents since closures are not `OwnerNode`s) - rust-lang#123806 (Panic on overflow in `BorrowedCursor::advance`) - rust-lang#123820 (Add my former address to .mailmap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123744 - compiler-errors:redundant-due-to-glob, r=petrochenkov Silence `unused_imports` for redundant imports Quick fix for rust-lang#121708 (comment) r? `@petrochenkov` cc `@joshtriplett` I think this is right, would like confirmation. I also think it's weird that we're using `=` to assign to `is_redundant` but using `per_ns` for the actual spans. Seems like this could be weirdly order dependent, but that's unrelated to this change.
[beta] backports - Silence `unused_imports` lint for redundant imports rust-lang#123744 - Call the panic hook for non-unwind panics in proc-macros rust-lang#123825 - rustdoc: check redundant explicit links with correct itemid rust-lang#123905 r? cuviper
[beta] backports - Silence `unused_imports` lint for redundant imports rust-lang#123744 - Call the panic hook for non-unwind panics in proc-macros rust-lang#123825 - rustdoc: check redundant explicit links with correct itemid rust-lang#123905 - disable two debuginfo tests under gdb 15 rust-lang#123963 r? cuviper
…petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
…petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
…petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
Rollup merge of rust-lang#123813 - compiler-errors:redundant-lint, r=petrochenkov Add `REDUNDANT_IMPORTS` lint for new redundant import detection Defaults to Allow for now. Stacked on rust-lang#123744 to avoid merge conflict, but much easier to review all as one. r? petrochenkov
Quick fix for #121708 (comment)
r? @petrochenkov cc @joshtriplett
I think this is right, would like confirmation. I also think it's weird that we're using
=
to assign tois_redundant
but usingper_ns
for the actual spans. Seems like this could be weirdly order dependent, but that's unrelated to this change.