diff options
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-cmp.h | 4 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-coercion.h | 4 | ||||
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-rules.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/gcc/rust/typecheck/rust-tyty-cmp.h b/gcc/rust/typecheck/rust-tyty-cmp.h index a23855e..291e590 100644 --- a/gcc/rust/typecheck/rust-tyty-cmp.h +++ b/gcc/rust/typecheck/rust-tyty-cmp.h @@ -1021,8 +1021,8 @@ public: for (size_t j = 0; j < a->num_fields (); j++) { - TyTy::StructFieldType *base_field = a->get_field_at_index (i); - TyTy::StructFieldType *other_field = b->get_field_at_index (i); + TyTy::StructFieldType *base_field = a->get_field_at_index (j); + TyTy::StructFieldType *other_field = b->get_field_at_index (j); TyTy::BaseType *this_field_ty = base_field->get_field_type (); TyTy::BaseType *other_field_ty = other_field->get_field_type (); diff --git a/gcc/rust/typecheck/rust-tyty-coercion.h b/gcc/rust/typecheck/rust-tyty-coercion.h index 6525da3..b483130 100644 --- a/gcc/rust/typecheck/rust-tyty-coercion.h +++ b/gcc/rust/typecheck/rust-tyty-coercion.h @@ -1031,8 +1031,8 @@ public: for (size_t j = 0; j < a->num_fields (); j++) { - TyTy::StructFieldType *base_field = a->get_field_at_index (i); - TyTy::StructFieldType *other_field = b->get_field_at_index (i); + TyTy::StructFieldType *base_field = a->get_field_at_index (j); + TyTy::StructFieldType *other_field = b->get_field_at_index (j); TyTy::BaseType *this_field_ty = base_field->get_field_type (); TyTy::BaseType *other_field_ty = other_field->get_field_type (); diff --git a/gcc/rust/typecheck/rust-tyty-rules.h b/gcc/rust/typecheck/rust-tyty-rules.h index f044d0e..5dc2d2f 100644 --- a/gcc/rust/typecheck/rust-tyty-rules.h +++ b/gcc/rust/typecheck/rust-tyty-rules.h @@ -1047,8 +1047,8 @@ public: for (size_t j = 0; j < a->num_fields (); j++) { - TyTy::StructFieldType *base_field = a->get_field_at_index (i); - TyTy::StructFieldType *other_field = b->get_field_at_index (i); + TyTy::StructFieldType *base_field = a->get_field_at_index (j); + TyTy::StructFieldType *other_field = b->get_field_at_index (j); TyTy::BaseType *this_field_ty = base_field->get_field_type (); TyTy::BaseType *other_field_ty = other_field->get_field_type (); |