File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -635,29 +635,6 @@ fn codegen_stmt<'tcx>(
635635 let ( ptr, _extra) = operand. load_scalar_pair ( fx) ;
636636 lval. write_cvalue ( fx, CValue :: by_val ( ptr, dest_layout) )
637637 }
638- } else if let ty:: Adt ( adt_def, _substs) = from_ty. kind ( ) {
639- // enum -> discriminant value
640- assert ! ( adt_def. is_enum( ) ) ;
641- match to_ty. kind ( ) {
642- ty:: Uint ( _) | ty:: Int ( _) => { }
643- _ => unreachable ! ( "cast adt {} -> {}" , from_ty, to_ty) ,
644- }
645- let to_clif_ty = fx. clif_type ( to_ty) . unwrap ( ) ;
646-
647- let discriminant = crate :: discriminant:: codegen_get_discriminant (
648- fx,
649- operand,
650- fx. layout_of ( operand. layout ( ) . ty . discriminant_ty ( fx. tcx ) ) ,
651- )
652- . load_scalar ( fx) ;
653-
654- let res = crate :: cast:: clif_intcast (
655- fx,
656- discriminant,
657- to_clif_ty,
658- to_ty. is_signed ( ) ,
659- ) ;
660- lval. write_cvalue ( fx, CValue :: by_val ( res, dest_layout) ) ;
661638 } else {
662639 let to_clif_ty = fx. clif_type ( to_ty) . unwrap ( ) ;
663640 let from = operand. load_scalar ( fx) ;
You can’t perform that action at this time.
0 commit comments