diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-05 16:30:00 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-08 11:58:11 -0400 |
| commit | f81549c9ca465e87ab6902dee8cdb4989ee50077 (patch) | |
| tree | 4a7239ad0a5dfb2072f781947d16d1ad12f51498 /compiler/rustc_const_eval/src/util/alignment.rs | |
| parent | d9dd5509dcf56b22b6c1844ed3077f292e4a87bf (diff) | |
| download | rust-f81549c9ca465e87ab6902dee8cdb4989ee50077.tar.gz rust-f81549c9ca465e87ab6902dee8cdb4989ee50077.zip | |
Normalize struct tail properly in disalignment check
Diffstat (limited to 'compiler/rustc_const_eval/src/util/alignment.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/util/alignment.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/util/alignment.rs b/compiler/rustc_const_eval/src/util/alignment.rs index 528274e6aba..a8ef37432bb 100644 --- a/compiler/rustc_const_eval/src/util/alignment.rs +++ b/compiler/rustc_const_eval/src/util/alignment.rs @@ -22,7 +22,7 @@ where }; let ty = place.ty(local_decls, tcx).ty; - let unsized_tail = || tcx.struct_tail_with_normalize(ty, |ty| ty, || {}); + let unsized_tail = || tcx.struct_tail_erasing_lifetimes(ty, param_env); match tcx.layout_of(param_env.and(ty)) { Ok(layout) if layout.align.abi <= pack |
