Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 777c7cd

Browse files
committed
Remove a function that has no necessary callers
1 parent 86e6cb5 commit 777c7cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/new_without_default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ impl<'tcx> LateLintPass<'tcx> for NewWithoutDefault {
9797
{
9898
if self.impling_types.is_none() {
9999
let mut impls = HirIdSet::default();
100-
cx.tcx.for_each_impl(default_trait_id, |d| {
100+
for &d in cx.tcx.local_trait_impls(default_trait_id) {
101101
let ty = cx.tcx.type_of(d).instantiate_identity();
102102
if let Some(ty_def) = ty.ty_adt_def() {
103103
if let Some(local_def_id) = ty_def.did().as_local() {
104104
impls.insert(cx.tcx.local_def_id_to_hir_id(local_def_id));
105105
}
106106
}
107-
});
107+
}
108108
self.impling_types = Some(impls);
109109
}
110110

0 commit comments

Comments
 (0)