diff options
| author | Ryo Yoshida <low.ryoshida@gmail.com> | 2023-01-06 04:43:08 +0900 |
|---|---|---|
| committer | Ryo Yoshida <low.ryoshida@gmail.com> | 2023-01-29 21:01:35 +0900 |
| commit | 807ebac887a535b047da349297bdd8d14e31f794 (patch) | |
| tree | 0f5995cf65277e6dafade4479b0fcaf643cfd462 /compiler/rustc_parse/src/parser | |
| parent | a29efccb1eff324c63454677688b5d7e08b5f40f (diff) | |
| download | rust-807ebac887a535b047da349297bdd8d14e31f794.tar.gz rust-807ebac887a535b047da349297bdd8d14e31f794.zip | |
Insert whitespace to avoid ident concatenation in suggestion
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 25de0a9e750..82d9138c7a3 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -1048,7 +1048,7 @@ impl<'a> Parser<'a> { self.parse_remaining_bounds(bounds, true)?; self.expect(&token::CloseDelim(Delimiter::Parenthesis))?; let sp = vec![lo, self.prev_token.span]; - let sugg: Vec<_> = sp.iter().map(|sp| (*sp, String::new())).collect(); + let sugg = vec![(lo, String::from(" ")), (self.prev_token.span, String::new())]; self.struct_span_err(sp, "incorrect braces around trait bounds") .multipart_suggestion( "remove the parentheses", |
