Rollup merge of #101038 - RalfJung:interning-alignment, r=oli-obk

no alignment check during interning

This should fix https://github.com/rust-lang/rust/issues/101034
r? `@oli-obk`

Unfortunately we don't have a self-contained testcase for this problem. I am not sure how it can be triggered...
This commit is contained in:
Matthias Krüger
2022-08-28 09:35:19 +02:00
committed by GitHub
3 changed files with 22 additions and 3 deletions

View File

@@ -74,7 +74,9 @@ fn eval_body_using_ecx<'mir, 'tcx>(
None => InternKind::Constant,
}
};
ecx.machine.check_alignment = false; // interning doesn't need to respect alignment
intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
// we leave alignment checks off, since this `ecx` will not be used for further evaluation anyway
debug!("eval_body_using_ecx done: {:?}", *ret);
Ok(ret)