Skip to content

Commit 653faca

Browse files
committed
---
yaml --- r: 38428 b: refs/heads/try c: 349fa1e h: refs/heads/master v: v3
1 parent 3cf1db2 commit 653faca

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: abae61257c4d866bb321bfb80ad16b7531736f7e
5+
refs/heads/try: 349fa1e550905577fd9545aada328fb0806cf641
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/middle/trans/consts.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -414,21 +414,10 @@ fn const_expr(cx: @crate_ctxt, e: @ast::expr) -> ValueRef {
414414
// variant or we wouldn't have gotten here -- the constant
415415
// checker forbids paths that don't map to C-like enum
416416
// variants.
417-
let ety = ty::expr_ty(cx.tcx, e);
418-
let llty = type_of::type_of(cx, ety);
419417
let lldiscrim = base::get_discrim_val(cx, e.span,
420418
enum_did,
421419
variant_did);
422-
423-
let fields = if ty::enum_is_univariant(cx.tcx, enum_did) {
424-
~[lldiscrim]
425-
} else {
426-
let llstructtys =
427-
lib::llvm::struct_element_types(llty);
428-
~[lldiscrim, C_null(llstructtys[1])]
429-
};
430-
431-
C_named_struct(llty, fields)
420+
C_struct(~[lldiscrim])
432421
}
433422
Some(ast::def_struct(_)) => {
434423
let ety = ty::expr_ty(cx.tcx, e);

0 commit comments

Comments
 (0)