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
|
@ -956,6 +956,14 @@ pub trait LintContext: Sized {
|
|||
db.span_note(glob_reexport_span, format!("the name `{}` in the {} namespace is supposed to be publicly re-exported here", name, namespace));
|
||||
db.span_note(private_item_span, "but the private item here shadows it".to_owned());
|
||||
}
|
||||
BuiltinLintDiagnostics::UnusedQualifications { path_span, unqualified_path } => {
|
||||
db.span_suggestion_verbose(
|
||||
path_span,
|
||||
"replace it with the unqualified path",
|
||||
unqualified_path,
|
||||
Applicability::MachineApplicable
|
||||
);
|
||||
}
|
||||
}
|
||||
// Rewrap `db`, and pass control to the user.
|
||||
decorate(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue