about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_mir/interpret/cast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/cast.rs b/src/librustc_mir/interpret/cast.rs
index 2777ada14f9..e6c9d9f5c79 100644
--- a/src/librustc_mir/interpret/cast.rs
+++ b/src/librustc_mir/interpret/cast.rs
@@ -257,7 +257,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpretCx<'mir, 'tcx, M> {
                     Err(e) => Err(e),
                 }
             }
-            _ => return err!(Unimplemented(format!("ptr to {:?} cast", dest_layout.ty))),
+            _ => bug!("invalid MIR: ptr to {:?} cast", dest_layout.ty)
         }
     }