inline format!() args up to and including rustc_middle
This commit is contained in:
@@ -375,7 +375,7 @@ impl TokenType {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
TokenType::Token(t) => format!("`{}`", pprust::token_kind_to_string(t)),
|
||||
TokenType::Keyword(kw) => format!("`{}`", kw),
|
||||
TokenType::Keyword(kw) => format!("`{kw}`"),
|
||||
TokenType::Operator => "an operator".to_string(),
|
||||
TokenType::Lifetime => "lifetime".to_string(),
|
||||
TokenType::Ident => "identifier".to_string(),
|
||||
@@ -445,7 +445,7 @@ pub(super) fn token_descr(token: &Token) -> String {
|
||||
TokenDescription::DocComment => "doc comment",
|
||||
});
|
||||
|
||||
if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{}`", name) }
|
||||
if let Some(kind) = kind { format!("{kind} `{name}`") } else { format!("`{name}`") }
|
||||
}
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
@@ -929,7 +929,7 @@ impl<'a> Parser<'a> {
|
||||
expect_err
|
||||
.span_suggestion_short(
|
||||
sp,
|
||||
format!("missing `{}`", token_str),
|
||||
format!("missing `{token_str}`"),
|
||||
token_str,
|
||||
Applicability::MaybeIncorrect,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user