about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Poveda <christianpoveda@protonmail.com>2019-06-29 22:50:37 -0500
committerChristian Poveda <christianpoveda@protonmail.com>2019-06-29 22:50:37 -0500
commit92c28bfabcbbbbf864308cd71750d4b20f306b37 (patch)
treecde97aae7d0d293c955c50d49ef5f404b45178f1
parent51793bd318a162752def38a6ae1ec9292861d0cc (diff)
downloadrust-92c28bfabcbbbbf864308cd71750d4b20f306b37.tar.gz
rust-92c28bfabcbbbbf864308cd71750d4b20f306b37.zip
Replace error by bug macro
-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)
         }
     }