Skip to content

Commit 0841a84

Browse files
committed
Auto merge of rust-lang#15184 - HKalbasi:mir, r=HKalbasi
Disable mir interpreter for targets with different pointer size from host fix rust-lang#15182
2 parents 76bcd99 + 45828cd commit 0841a84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/hir-ty/src/mir/eval.rs

+3
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ pub fn interpret_mir(
468468
let ty = body.locals[return_slot()].ty.clone();
469469
let mut evaluator = Evaluator::new(db, body, assert_placeholder_ty_is_unused);
470470
let x: Result<Const> = (|| {
471+
if evaluator.ptr_size() != std::mem::size_of::<usize>() {
472+
not_supported!("targets with different pointer size from host");
473+
}
471474
let bytes = evaluator.interpret_mir(&body, None.into_iter())?;
472475
let mut memory_map = evaluator.create_memory_map(
473476
&bytes,

0 commit comments

Comments
 (0)