Spurious unused import warning with trait used transitively via use super::* #41358
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
triggers
This happens on both stable and nightly. The warning goes away if
use super::*
is replaced byuse super::{Rc, Deref}
. And the sample of course fails to compile if you remove theuse std::ops::Deref
.I ran into this while trying to take advantage of serde-rs/serde#765 by defining a bunch of modules with a common set of imports and a
use super::*
in each module for simplicity.The text was updated successfully, but these errors were encountered: