]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/callee.rs
Auto merge of #35856 - phimuemue:master, r=brson
[rust.git] / src / librustc_typeck / check / callee.rs
index 985c3be149617dc388a08a2e932b92f41f1eeef9..acb6653214dcbd8847d2db5ca4c34b4f68c94687 100644 (file)
@@ -29,7 +29,7 @@
 pub fn check_legal_trait_for_method_call(ccx: &CrateCtxt, span: Span, trait_id: DefId) {
     if ccx.tcx.lang_items.drop_trait() == Some(trait_id) {
         struct_span_err!(ccx.tcx.sess, span, E0040, "explicit use of destructor method")
-            .span_label(span, &format!("call to destructor method"))
+            .span_label(span, &format!("explicit destructor calls not allowed"))
             .emit();
     }
 }