avoid Symbol
to &str
conversions
This commit is contained in:
parent
95e77648e4
commit
a22934bea1
12 changed files with 28 additions and 23 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue