remove unnecessary to_string
and String::new
for tool_only_span_suggestion
This commit is contained in:
parent
77d6176e69
commit
fd1290a631
6 changed files with 7 additions and 12 deletions
|
@ -271,7 +271,7 @@ impl<'a> Resolver<'a> {
|
|||
err.tool_only_span_suggestion(
|
||||
import.use_span_with_attributes,
|
||||
"remove unnecessary import",
|
||||
String::new(),
|
||||
"",
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
|
@ -396,12 +396,7 @@ impl<'a> Resolver<'a> {
|
|||
// previous imports.
|
||||
if found_closing_brace {
|
||||
if let Some(span) = extend_span_to_previous_binding(self.session, span) {
|
||||
err.tool_only_span_suggestion(
|
||||
span,
|
||||
message,
|
||||
String::new(),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
err.tool_only_span_suggestion(span, message, "", Applicability::MaybeIncorrect);
|
||||
} else {
|
||||
// Remove the entire line if we cannot extend the span back, this indicates an
|
||||
// `issue_52891::{self}` case.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue