1
Fork 0

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

@ -77,7 +77,7 @@ fn err_if_attr_found(ctxt: &EntryContext<'_>, attrs: &[Attribute], sym: Symbol)
.sess
.struct_span_err(
attr.span,
&format!("`{}` attribute can only be used on functions", sym.as_str()),
&format!("`{}` attribute can only be used on functions", sym),
)
.emit();
}