Insert whitespace to avoid ident concatenation in suggestion
This commit is contained in:
parent
a29efccb1e
commit
807ebac887
3 changed files with 23 additions and 9 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue