Add machine-applicable suggestion for unused_qualifications
lint
This commit is contained in:
parent
33a2c2487a
commit
0b5c683b06
7 changed files with 98 additions and 1 deletions
|
@ -3917,11 +3917,15 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
};
|
||||
if res == unqualified_result {
|
||||
let lint = lint::builtin::UNUSED_QUALIFICATIONS;
|
||||
self.r.lint_buffer.buffer_lint(
|
||||
self.r.lint_buffer.buffer_lint_with_diagnostic(
|
||||
lint,
|
||||
finalize.node_id,
|
||||
finalize.path_span,
|
||||
"unnecessary qualification",
|
||||
lint::BuiltinLintDiagnostics::UnusedQualifications {
|
||||
path_span: finalize.path_span,
|
||||
unqualified_path: path.last().unwrap().ident
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue