Skip to content

Commit 09758f7

Browse files
committed
Merge pull request rust-lang#4357 from jld/constenum-bonus-fix
Trivial cleanup: use enum_is_univariant; no functional change intended.
2 parents 78aad60 + 8f8b417 commit 09758f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/trans/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn fill_type_of_enum(cx: @crate_ctxt, did: ast::def_id, t: ty::t,
230230
debug!("type_of_enum %?: %?", t, ty::get(t));
231231

232232
let lltys = {
233-
let degen = (*ty::enum_variants(cx.tcx, did)).len() == 1u;
233+
let degen = ty::enum_is_univariant(cx.tcx, did);
234234
let size = shape::static_size_of_enum(cx, t);
235235
if !degen {
236236
~[T_enum_discrim(cx), T_array(T_i8(), size)]

0 commit comments

Comments
 (0)