diff --git a/src/librustc_mir/interpret/cast.rs b/src/librustc_mir/interpret/cast.rs index 2777ada14f9ad..e6c9d9f5c79d8 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) } }