1
Fork 0

Remove need for &format!(...) or &&"" dances in span_label calls

This commit is contained in:
Oliver Schneider 2017-05-04 14:17:23 +02:00
parent 70198a0a44
commit dd87eabd83
56 changed files with 305 additions and 305 deletions

View file

@ -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 {