Skip to content

Commit 69b96a3

Browse files
committed
---
yaml --- r: 81339 b: refs/heads/snap-stage3 c: f2932e4 h: refs/heads/master i: 81337: 425cbd0 81335: 132cb0b v: v3
1 parent c213ae5 commit 69b96a3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: abe648d60854c7dbbc0c9db5f29111268c66961d
4+
refs/heads/snap-stage3: f2932e46614ab0f91f7dfd064cadf1e3db2a9667
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/common.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ pub fn type_is_immediate(ccx: &mut CrateContext, ty: ty::t) -> bool {
6969
if simple {
7070
return true;
7171
}
72+
// FIXME: #9651: C-like enums should also be immediate
73+
if ty::type_is_c_like_enum(ccx.tcx, ty) {
74+
return false;
75+
}
7276
match ty::get(ty).sty {
73-
// FIXME: #9651: small `ty_struct` and `ty_enum` should also be immediate
74-
ty::ty_tup(*) => {
77+
// FIXME: #9651: small `ty_struct` should also be immediate
78+
ty::ty_enum(*) | ty::ty_tup(*) => {
7579
let llty = sizing_type_of(ccx, ty);
7680
llsize_of_alloc(ccx, llty) <= llsize_of_alloc(ccx, ccx.int_type)
7781
}

0 commit comments

Comments
 (0)