Fix removal span calculation of unused_qualifications suggestion
This commit is contained in:
parent
da6b55cc5e
commit
33bd453f35
10 changed files with 138 additions and 22 deletions
|
@ -956,11 +956,11 @@ 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 } => {
|
||||
BuiltinLintDiagnostics::UnusedQualifications { removal_span } => {
|
||||
db.span_suggestion_verbose(
|
||||
path_span,
|
||||
"replace it with the unqualified path",
|
||||
unqualified_path,
|
||||
removal_span,
|
||||
"remove the unnecessary path segments",
|
||||
"",
|
||||
Applicability::MachineApplicable
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue