A warning about redundant imports should be separate from unused_imports
#121825
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Problem
There is a set of related problems:
std
and withno_std
, because the prelude contents are different. In particular an unconditionaluse alloc::vec::Vec
causes a warning (or error with-Dwarnings
):error: the item
Vecis imported redundantly
AFAIU the new warning has been introduced for issue #117448 in the changes here: #117772
This problem has been originally found in https://crbug.com/326247202. (In https://crbug.com/326247202#comment10 and https://crbug.com/326247202#comment11 we discussed disabling the new warning, but it doesn't seem possible without also disabling
unused_imports
.)Steps
Possible Solution(s)
Maybe it would be helpful to have 2 separate warnings: the old
unused_imports
warning, and a separateredundant_imports
warning?Version
The text was updated successfully, but these errors were encountered: