1
Fork 0

report UB when the niche value refers to the untagged variant

This commit is contained in:
Ralf Jung 2024-11-30 18:06:33 +01:00
parent ce95a44db6
commit a36652c274
4 changed files with 29 additions and 21 deletions

View file

@ -81,7 +81,7 @@ fn layout_of<'tcx>(
record_layout_for_printing(&cx, layout);
}
invariant::partially_check_layout(&cx, &layout);
invariant::layout_sanity_check(&cx, &layout);
Ok(layout)
}