From da9791767bf9d4c334e22a1c4718e325279be984 Mon Sep 17 00:00:00 2001 From: Jonathan S Date: Sat, 23 Dec 2017 20:38:36 -0600 Subject: [PATCH] Remove unnecessary assert that unions have only one variant --- src/librustc/ty/layout.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index b46a7585945..b6871147da8 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -1357,9 +1357,6 @@ enum StructKind { 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