File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -802,14 +802,15 @@ fn codegen_stmt<'tcx>(
802802 if active_field_index. is_some ( ) {
803803 assert_eq ! ( operands. len( ) , 1 ) ;
804804 }
805- for ( i, operand) in operands. iter ( ) . enumerate ( ) {
805+ for ( i, operand) in operands. iter_enumerated ( ) {
806806 let operand = codegen_operand ( fx, operand) ;
807807 let field_index = active_field_index. unwrap_or ( i) ;
808808 let to = if let mir:: AggregateKind :: Array ( _) = * * kind {
809- let index = fx. bcx . ins ( ) . iconst ( fx. pointer_type , field_index as i64 ) ;
809+ let array_index = i64:: from ( field_index. as_u32 ( ) ) ;
810+ let index = fx. bcx . ins ( ) . iconst ( fx. pointer_type , array_index) ;
810811 variant_dest. place_index ( fx, index)
811812 } else {
812- variant_dest. place_field ( fx, FieldIdx :: new ( field_index) )
813+ variant_dest. place_field ( fx, field_index)
813814 } ;
814815 to. write_cvalue ( fx, operand) ;
815816 }
You can’t perform that action at this time.
0 commit comments