1
Fork 0

Silence unused_imports lint for redundant imports

This commit is contained in:
Michael Goulet 2024-04-11 13:32:17 -04:00
parent 72fe8a0f00
commit 0db2a4010a
26 changed files with 43 additions and 275 deletions

View file

@ -1391,6 +1391,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
let mut redundant_spans: Vec<_> = redundant_span.present_items().collect();
redundant_spans.sort();
redundant_spans.dedup();
/* FIXME(unused_imports): Add this back as a new lint
self.lint_buffer.buffer_lint_with_diagnostic(
UNUSED_IMPORTS,
id,
@ -1398,6 +1399,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
format!("the item `{source}` is imported redundantly"),
BuiltinLintDiag::RedundantImport(redundant_spans, source),
);
*/
return true;
}