We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abe648d commit f2932e4Copy full SHA for f2932e4
src/librustc/middle/trans/common.rs
@@ -69,9 +69,13 @@ pub fn type_is_immediate(ccx: &mut CrateContext, ty: ty::t) -> bool {
69
if simple {
70
return true;
71
}
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
+ }
76
match ty::get(ty).sty {
- // FIXME: #9651: small `ty_struct` and `ty_enum` should also be immediate
- ty::ty_tup(*) => {
77
+ // FIXME: #9651: small `ty_struct` should also be immediate
78
+ ty::ty_enum(*) | ty::ty_tup(*) => {
79
let llty = sizing_type_of(ccx, ty);
80
llsize_of_alloc(ccx, llty) <= llsize_of_alloc(ccx, ccx.int_type)
81
0 commit comments