]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/diagnostics/mod.rs
Auto merge of #75912 - scottmcm:manuallydrop-vs-forget, r=Mark-Simulacrum
[rust.git] / src / librustc_mir / borrow_check / diagnostics / mod.rs
index daffdec2a83bed72239b89fcfc78aa523b553688..e73a78811d49052196321ad216a8f3c1ec0a267d 100644 (file)
@@ -412,10 +412,11 @@ pub(super) fn note_type_does_not_implement_copy(
         place_desc: &str,
         ty: Ty<'tcx>,
         span: Option<Span>,
+        move_prefix: &str,
     ) {
         let message = format!(
-            "move occurs because {} has type `{}`, which does not implement the `Copy` trait",
-            place_desc, ty,
+            "{}move occurs because {} has type `{}`, which does not implement the `Copy` trait",
+            move_prefix, place_desc, ty,
         );
         if let Some(span) = span {
             err.span_label(span, message);