Remove need for &format!(...) or &&"" dances in span_label
calls
This commit is contained in:
parent
70198a0a44
commit
dd87eabd83
56 changed files with 305 additions and 305 deletions
|
@ -43,7 +43,7 @@ impl<'a> CheckAttrVisitor<'a> {
|
|||
fn check_inline(&self, attr: &ast::Attribute, target: Target) {
|
||||
if target != Target::Fn {
|
||||
struct_span_err!(self.sess, attr.span, E0518, "attribute should be applied to function")
|
||||
.span_label(attr.span, &format!("requires a function"))
|
||||
.span_label(attr.span, "requires a function")
|
||||
.emit();
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ impl<'a> CheckAttrVisitor<'a> {
|
|||
_ => continue,
|
||||
};
|
||||
struct_span_err!(self.sess, attr.span, E0517, "{}", message)
|
||||
.span_label(attr.span, &format!("requires {}", label))
|
||||
.span_label(attr.span, format!("requires {}", label))
|
||||
.emit();
|
||||
}
|
||||
if conflicting_reprs > 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue