File tree 1 file changed +4
-3
lines changed
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>(
802
802
if active_field_index. is_some ( ) {
803
803
assert_eq ! ( operands. len( ) , 1 ) ;
804
804
}
805
- for ( i, operand) in operands. iter ( ) . enumerate ( ) {
805
+ for ( i, operand) in operands. iter_enumerated ( ) {
806
806
let operand = codegen_operand ( fx, operand) ;
807
807
let field_index = active_field_index. unwrap_or ( i) ;
808
808
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) ;
810
811
variant_dest. place_index ( fx, index)
811
812
} else {
812
- variant_dest. place_field ( fx, FieldIdx :: new ( field_index) )
813
+ variant_dest. place_field ( fx, field_index)
813
814
} ;
814
815
to. write_cvalue ( fx, operand) ;
815
816
}
You can’t perform that action at this time.
0 commit comments