-
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
False positive unused_import warning on std::string::String #71450
Comments
It seems this regressed somewhere between 1.34.0 and 1.35.0 |
More accurately, it looks like the false positive has been present since the introduction of the warning in #58805 |
I was actually a little surprised that
did not cause a compilation error due to two imports of the same name at the same level. |
I got something similar while implementing ops::Div
when removed, it errors
|
This issue no longer reproduces and can be closed when a corresponding test is added. |
…ochenkov add test for rust-lang#78894 rust-lang#71450 fixes rust-lang#78894 fixes rust-lang#71450
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#121280 (Implement MaybeUninit::fill{,_with,_from}) - rust-lang#121438 (std support for wasm32 panic=unwind) - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly) - rust-lang#121959 (Removing absolute path in proc-macro) - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) r? `@ghost` `@rustbot` modify labels: rollup
…ochenkov add test for rust-lang#78894 rust-lang#71450 fixes rust-lang#78894 fixes rust-lang#71450
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly) - rust-lang#121846 (only compare ambiguity item that have hard error) - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly) - rust-lang#121846 (only compare ambiguity item that have hard error) - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121961 - surechen:add_test_20240304, r=petrochenkov add test for rust-lang#78894 rust-lang#71450 fixes
This (very contrived) example emits a warning:
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4333aa0dec7b94c3d2942e7380894003
This is a false positive because removing
use std::string::String
results in a compilation error:Meta
Same for
1.43.0-beta.6
and1.44.0-nightly (2020-04-21 45d050cde277b22a7558)
.The text was updated successfully, but these errors were encountered: