avoid Symbol to &str conversions

This commit is contained in:
Takayuki Maeda 2022-07-18 14:25:34 +09:00
parent 95e77648e4
commit a22934bea1
12 changed files with 28 additions and 23 deletions

View file

@ -325,7 +325,7 @@ impl<'a> ResolverExpand for Resolver<'a> {
UNUSED_MACROS,
node_id,
ident.span,
&format!("unused macro definition: `{}`", ident.as_str()),
&format!("unused macro definition: `{}`", ident.name),
);
}
for (&(def_id, arm_i), &(ident, rule_span)) in self.unused_macro_rules.iter() {
@ -341,7 +341,7 @@ impl<'a> ResolverExpand for Resolver<'a> {
&format!(
"{} rule of macro `{}` is never used",
crate::diagnostics::ordinalize(arm_i + 1),
ident.as_str()
ident.name
),
);
}