diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-06-17 18:48:09 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-06-17 18:48:09 +0900 |
| commit | 2135331a3352fa81dcb8592daa435d7a32d93ca0 (patch) | |
| tree | 2fb36157dba0be44679d9e57c92643c909faccc4 /compiler/rustc_parse/src | |
| parent | 349bda2051e94b7aefb33d6541f48f561bf06dbc (diff) | |
| download | rust-2135331a3352fa81dcb8592daa435d7a32d93ca0.tar.gz rust-2135331a3352fa81dcb8592daa435d7a32d93ca0.zip | |
remove the rest of unnecessary `to_string`
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index c56f70e853d..acf892cec53 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -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(), |
