Normalize struct tail properly in disalignment check
This commit is contained in:
parent
d9dd5509dc
commit
f81549c9ca
4 changed files with 172 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue