File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -75,26 +75,13 @@ pub fn type_is_fat_ptr<'tcx>(cx: &TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
75
75
}
76
76
}
77
77
78
- fn type_is_newtype_immediate < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > , ty : Ty < ' tcx > ) -> bool {
79
- match ty. sty {
80
- ty:: TyStruct ( def, substs) => {
81
- let fields = & def. struct_variant ( ) . fields ;
82
- fields. len ( ) == 1 && {
83
- type_is_immediate ( ccx, monomorphize:: field_ty ( ccx. tcx ( ) , substs, & fields[ 0 ] ) )
84
- }
85
- }
86
- _ => false
87
- }
88
- }
89
-
90
78
pub fn type_is_immediate < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > , ty : Ty < ' tcx > ) -> bool {
91
79
use trans:: machine:: llsize_of_alloc;
92
80
use trans:: type_of:: sizing_type_of;
93
81
94
82
let tcx = ccx. tcx ( ) ;
95
83
let simple = ty. is_scalar ( ) ||
96
84
ty. is_unique ( ) || ty. is_region_ptr ( ) ||
97
- type_is_newtype_immediate ( ccx, ty) ||
98
85
ty. is_simd ( ) ;
99
86
if simple && !type_is_fat_ptr ( tcx, ty) {
100
87
return true ;
You can’t perform that action at this time.
0 commit comments