Silence unused_imports lint for redundant imports
This commit is contained in:
parent
72fe8a0f00
commit
0db2a4010a
26 changed files with 43 additions and 275 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ enum ImplTraitContext {
|
|||
|
||||
/// Used for tracking import use types which will be used for redundant import checking.
|
||||
/// ### Used::Scope Example
|
||||
/// ```rust,compile_fail
|
||||
/// ```rust,ignore (redundant_imports)
|
||||
/// #![deny(unused_imports)]
|
||||
/// use std::mem::drop;
|
||||
/// fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue