Skip to content

Commit f6c2285

Browse files
committed
---
yaml --- r: 82087 b: refs/heads/master c: f2932e4 h: refs/heads/master i: 82085: 4f69e54 82083: c06f7e5 82079: 5103eb3 v: v3
1 parent 843d761 commit f6c2285

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,5 +1,5 @@
11
---
2-
refs/heads/master: abe648d60854c7dbbc0c9db5f29111268c66961d
2+
refs/heads/master: f2932e46614ab0f91f7dfd064cadf1e3db2a9667
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/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)