]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/callee.rs
Remove need for &format!(...) or &&"" dances in `span_label` calls
[rust.git] / src / librustc_typeck / check / callee.rs
index 7a49309e005a11de55a0dbaadb085a1ccf4d309f..dde5f598a68329ec77a3e91c858fdcfb46575085 100644 (file)
@@ -27,7 +27,7 @@
 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();
     }
 }