Skip to content

Commit

Permalink
Remove unnecessary assert that unions have only one variant
Browse files Browse the repository at this point in the history
  • Loading branch information
gereeter committed Dec 24, 2017
1 parent cbcf2ff commit da97917
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/librustc/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,9 +1357,6 @@ impl<'a, 'tcx> LayoutDetails {
if packed && def.repr.align > 0 {
bug!("Union cannot be packed and aligned");
}
if variants.len() != 1 {
bug!("Union must be represented as a single variant");
}

let mut align = if def.repr.packed() {
dl.i8_align
Expand Down

0 comments on commit da97917

Please sign in to comment.