report UB when the niche value refers to the untagged variant
This commit is contained in:
parent
ce95a44db6
commit
a36652c274
4 changed files with 29 additions and 21 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue