We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e81009d commit 257b024Copy full SHA for 257b024
clippy_lints/src/unused_trait_names.rs
@@ -65,7 +65,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedTraitNames {
65
&& ident.name != kw::Underscore
66
// Only check traits
67
&& let Some(Res::Def(DefKind::Trait, _)) = path.res.type_ns
68
- && cx.tcx.maybe_unused_trait_imports(()).contains(&item.owner_id.def_id)
+ && cx.tcx.resolutions(()).maybe_unused_trait_imports.contains(&item.owner_id.def_id)
69
// Only check this import if it is visible to its module only (no pub, pub(crate), ...)
70
&& let module = cx.tcx.parent_module_from_def_id(item.owner_id.def_id)
71
&& cx.tcx.visibility(item.owner_id.def_id) == Visibility::Restricted(module.to_def_id())
0 commit comments