@@ -479,13 +479,6 @@ impl<'a, 'tcx> MirConstContext<'a, 'tcx> {
479
479
let ty = self . monomorphize ( & constant. ty ) ;
480
480
match constant. literal . clone ( ) {
481
481
mir:: Literal :: Item { def_id, substs } => {
482
- // Shortcut for zero-sized types
483
- // which would not work with MirConstContext.
484
- if common:: type_is_zero_size ( self . ccx , ty) {
485
- let llty = type_of:: type_of ( self . ccx , ty) ;
486
- return Ok ( Const :: new ( C_null ( llty) , ty) ) ;
487
- }
488
-
489
482
let substs = self . monomorphize ( & substs) ;
490
483
MirConstContext :: trans_def ( self . ccx , def_id, substs, IndexVec :: new ( ) )
491
484
}
@@ -927,13 +920,6 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
927
920
let ty = self . monomorphize ( & constant. ty ) ;
928
921
let result = match constant. literal . clone ( ) {
929
922
mir:: Literal :: Item { def_id, substs } => {
930
- // Shortcut for zero-sized types
931
- // which would not work with MirConstContext.
932
- if common:: type_is_zero_size ( bcx. ccx , ty) {
933
- let llty = type_of:: type_of ( bcx. ccx , ty) ;
934
- return Const :: new ( C_null ( llty) , ty) ;
935
- }
936
-
937
923
let substs = self . monomorphize ( & substs) ;
938
924
MirConstContext :: trans_def ( bcx. ccx , def_id, substs, IndexVec :: new ( ) )
939
925
}
0 commit comments