We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 563ab4a commit d5ccf68Copy full SHA for d5ccf68
compiler/rustc_mir/src/interpret/place.rs
@@ -374,8 +374,9 @@ where
374
.size_and_align_of_mplace(&place)?
375
.unwrap_or((place.layout.size, place.layout.align.abi));
376
assert!(place.mplace.align <= align, "dynamic alignment less strict than static one?");
377
- // Check (stricter) dynamic alignment, unless forced otherwise.
378
- place.mplace.align = force_align.unwrap_or(align);
+ let align = force_align.unwrap_or(align);
+ // Record new (stricter, unless forced) alignment requirement in place.
379
+ place.mplace.align = align;
380
// When dereferencing a pointer, it must be non-null, aligned, and live.
381
if let Some(ptr) = self.memory.check_ptr_access(place.ptr, size, align)? {
382
place.mplace.ptr = ptr.into();
0 commit comments