1
Fork 0

couple of clippy::perf fixes

This commit is contained in:
Matthias Krüger 2022-11-18 10:30:47 +01:00
parent 83356b78c4
commit e3036df003
11 changed files with 14 additions and 16 deletions

View file

@ -353,7 +353,7 @@ impl CheckAttrVisitor<'_> {
attr.span,
OnlyHasEffectOn {
attr_name: attr.name_or_empty(),
target_name: allowed_target.name().replace(" ", "_"),
target_name: allowed_target.name().replace(' ', "_"),
},
);
}

View file

@ -772,7 +772,7 @@ impl<'tcx> DeadVisitor<'tcx> {
self.tcx.emit_spanned_lint(
lint,
tcx.hir().local_def_id_to_hir_id(first_id),
MultiSpan::from_spans(spans.clone()),
MultiSpan::from_spans(spans),
diag,
);
}