Rollup merge of #98191 - TaKO8Ki:remove-rest-of-unnecessary-to-string, r=Dylan-DPC

Remove the rest of unnecessary `to_string`

I removed most of unnecessary `to_string` in #98043. This patch removes the rest of them I missed.
This commit is contained in:
Dylan DPC 2022-06-17 12:21:50 +02:00 committed by GitHub
commit 847e692b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -2042,9 +2042,9 @@ impl<'a> Parser<'a> {
match pat.kind {
PatKind::Ident(_, ident, _) => (
ident,
"self: ".to_string(),
"self: ",
": TypeName".to_string(),
"_: ".to_string(),
"_: ",
pat.span.shrink_to_lo(),
pat.span.shrink_to_hi(),
pat.span.shrink_to_lo(),
@ -2058,9 +2058,9 @@ impl<'a> Parser<'a> {
let mutab = mutab.prefix_str();
(
ident,
"self: ".to_string(),
"self: ",
format!("{ident}: &{mutab}TypeName"),
"_: ".to_string(),
"_: ",
pat.span.shrink_to_lo(),
pat.span,
pat.span.shrink_to_lo(),

View file

@ -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);
}
}