File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/rustc_mir/src/interpret Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -374,8 +374,9 @@ where
374
374
. size_and_align_of_mplace ( & place) ?
375
375
. unwrap_or ( ( place. layout . size , place. layout . align . abi ) ) ;
376
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) ;
377
+ let align = force_align. unwrap_or ( align) ;
378
+ // Record new (stricter, unless forced) alignment requirement in place.
379
+ place. mplace . align = align;
379
380
// When dereferencing a pointer, it must be non-null, aligned, and live.
380
381
if let Some ( ptr) = self . memory . check_ptr_access ( place. ptr , size, align) ? {
381
382
place. mplace . ptr = ptr. into ( ) ;
You can’t perform that action at this time.
0 commit comments