aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 0dde299..a58e1cd 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -840,16 +840,14 @@ ADTType::is_equal (const BaseType &other) const
return false;
}
}
- else
+
+ for (size_t i = 0; i < number_of_variants (); i++)
{
- for (size_t i = 0; i < number_of_variants (); i++)
- {
- const TyTy::VariantDef *a = get_variants ().at (i);
- const TyTy::VariantDef *b = other2.get_variants ().at (i);
+ const TyTy::VariantDef *a = get_variants ().at (i);
+ const TyTy::VariantDef *b = other2.get_variants ().at (i);
- if (!a->is_equal (*b))
- return false;
- }
+ if (!a->is_equal (*b))
+ return false;
}
return true;