pub fn check_legal_trait_for_method_call(tcx: TyCtxt, span: Span, trait_id: DefId) {
if tcx.lang_items.drop_trait() == Some(trait_id) {
struct_span_err!(tcx.sess, span, E0040, "explicit use of destructor method")
- .span_label(span, &format!("explicit destructor calls not allowed"))
+ .span_label(span, "explicit destructor calls not allowed")
.emit();
}
}