inline format!() args up to and including rustc_middle

This commit is contained in:
Matthias Krüger
2023-07-25 22:00:13 +02:00
parent 2e0136a131
commit 23815467a2
87 changed files with 378 additions and 437 deletions

View File

@@ -803,7 +803,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
&self.cx.sess.parse_sess,
sym::proc_macro_hygiene,
span,
format!("custom attributes cannot be applied to {}", kind),
format!("custom attributes cannot be applied to {kind}"),
)
.emit();
}
@@ -1707,7 +1707,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
&UNUSED_ATTRIBUTES,
attr.span,
self.cx.current_expansion.lint_node_id,
format!("unused attribute `{}`", attr_name),
format!("unused attribute `{attr_name}`"),
BuiltinLintDiagnostics::UnusedBuiltinAttribute {
attr_name,
macro_name: pprust::path_to_string(&call.path),