diff --git a/src/base.rs b/src/base.rs index 615ef58ff58..98112fe0830 100644 --- a/src/base.rs +++ b/src/base.rs @@ -379,6 +379,18 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) { source_info.span, ); } + AssertKind::MisalignedPointerDereference { ref required, ref found } => { + let required = codegen_operand(fx, required).load_scalar(fx); + let found = codegen_operand(fx, found).load_scalar(fx); + let location = fx.get_caller_location(source_info).load_scalar(fx); + + codegen_panic_inner( + fx, + rustc_hir::LangItem::PanicBoundsCheck, + &[required, found, location], + source_info.span, + ); + } _ => { let msg_str = msg.description(); codegen_panic(fx, msg_str, source_info);