remove the rest of unnecessary to_string
This commit is contained in:
parent
349bda2051
commit
2135331a33
2 changed files with 5 additions and 5 deletions
|
@ -2042,9 +2042,9 @@ impl<'a> Parser<'a> {
|
||||||
match pat.kind {
|
match pat.kind {
|
||||||
PatKind::Ident(_, ident, _) => (
|
PatKind::Ident(_, ident, _) => (
|
||||||
ident,
|
ident,
|
||||||
"self: ".to_string(),
|
"self: ",
|
||||||
": TypeName".to_string(),
|
": TypeName".to_string(),
|
||||||
"_: ".to_string(),
|
"_: ",
|
||||||
pat.span.shrink_to_lo(),
|
pat.span.shrink_to_lo(),
|
||||||
pat.span.shrink_to_hi(),
|
pat.span.shrink_to_hi(),
|
||||||
pat.span.shrink_to_lo(),
|
pat.span.shrink_to_lo(),
|
||||||
|
@ -2058,9 +2058,9 @@ impl<'a> Parser<'a> {
|
||||||
let mutab = mutab.prefix_str();
|
let mutab = mutab.prefix_str();
|
||||||
(
|
(
|
||||||
ident,
|
ident,
|
||||||
"self: ".to_string(),
|
"self: ",
|
||||||
format!("{ident}: &{mutab}TypeName"),
|
format!("{ident}: &{mutab}TypeName"),
|
||||||
"_: ".to_string(),
|
"_: ",
|
||||||
pat.span.shrink_to_lo(),
|
pat.span.shrink_to_lo(),
|
||||||
pat.span,
|
pat.span,
|
||||||
pat.span.shrink_to_lo(),
|
pat.span.shrink_to_lo(),
|
||||||
|
|
|
@ -771,7 +771,7 @@ impl<T: LintContext> DiagnosticExt<T> for rustc_errors::Diagnostic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.span_suggestion(remove_span, msg, String::new(), applicability);
|
self.span_suggestion(remove_span, msg, "", applicability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue