inline format!() args up to and including rustc_middle
This commit is contained in:
parent
2e0136a131
commit
23815467a2
87 changed files with 378 additions and 437 deletions
|
@ -612,13 +612,13 @@ impl<'a> Parser<'a> {
|
|||
if let TokenKind::Ident(prev, _) = &self.prev_token.kind
|
||||
&& let TokenKind::Ident(cur, _) = &self.token.kind
|
||||
{
|
||||
let concat = Symbol::intern(&format!("{}{}", prev, cur));
|
||||
let concat = Symbol::intern(&format!("{prev}{cur}"));
|
||||
let ident = Ident::new(concat, DUMMY_SP);
|
||||
if ident.is_used_keyword() || ident.is_reserved() || ident.is_raw_guess() {
|
||||
let span = self.prev_token.span.to(self.token.span);
|
||||
err.span_suggestion_verbose(
|
||||
span,
|
||||
format!("consider removing the space to spell keyword `{}`", concat),
|
||||
format!("consider removing the space to spell keyword `{concat}`"),
|
||||
concat,
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue