File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ pub fn type_is_immediate(ccx: &CrateContext, ty: ty::t) -> bool {
6464 let tcx = ccx. tcx ;
6565 let simple = ty:: type_is_scalar ( ty) || ty:: type_is_boxed ( ty) ||
6666 ty:: type_is_unique ( ty) || ty:: type_is_region_ptr ( ty) ||
67- type_is_newtype_immediate ( ccx, ty) ||
67+ type_is_newtype_immediate ( ccx, ty) || ty :: type_is_bot ( ty ) ||
6868 ty:: type_is_simd ( tcx, ty) ;
6969 if simple {
7070 return true ;
@@ -75,7 +75,7 @@ pub fn type_is_immediate(ccx: &CrateContext, ty: ty::t) -> bool {
7575 let llty = sizing_type_of ( ccx, ty) ;
7676 llsize_of_alloc ( ccx, llty) <= llsize_of_alloc ( ccx, ccx. int_type )
7777 }
78- _ => false
78+ _ => type_is_voidish ( ccx , ty )
7979 }
8080}
8181
Original file line number Diff line number Diff line change @@ -553,7 +553,6 @@ pub fn get_base_and_byte_len(bcx: &Block,
553553
554554 match vstore {
555555 ty:: vstore_fixed( n) => {
556- assert ! ( !type_is_immediate( bcx. ccx( ) , vt. vec_ty) ) ;
557556 let base = GEPi ( bcx, llval, [ 0 u, 0 u] ) ;
558557 let len = Mul ( bcx, C_uint ( ccx, n) , vt. llunit_size ) ;
559558 ( base, len)
@@ -596,7 +595,6 @@ pub fn get_base_and_len(bcx: &Block,
596595
597596 match vstore {
598597 ty:: vstore_fixed( n) => {
599- assert ! ( !type_is_immediate( bcx. ccx( ) , vt. vec_ty) ) ;
600598 let base = GEPi ( bcx, llval, [ 0 u, 0 u] ) ;
601599 ( base, C_uint ( ccx, n) )
602600 }
You can’t perform that action at this time.
0 commit comments