Do normalize when computing struct tails in codegen
This commit is contained in:
parent
d3a393932e
commit
85b5e42d5e
2 changed files with 4 additions and 3 deletions
|
@ -549,7 +549,7 @@ fn fn_abi_sanity_check<'tcx>(
|
|||
// With metadata. Must be unsized and not on the stack.
|
||||
assert!(arg.layout.is_unsized() && !on_stack);
|
||||
// Also, must not be `extern` type.
|
||||
let tail = cx.tcx.struct_tail_with_normalize(arg.layout.ty, |ty| ty, || {});
|
||||
let tail = cx.tcx.struct_tail_erasing_lifetimes(arg.layout.ty, cx.param_env());
|
||||
if matches!(tail.kind(), ty::Foreign(..)) {
|
||||
// These types do not have metadata, so having `meta_attrs` is bogus.
|
||||
// Conceptually, unsized arguments must be copied around, which requires dynamically
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue