diff options
author | Yizhe <yizhe@pku.edu.cn> | 2021-02-19 09:29:17 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-02-19 10:34:59 +0000 |
commit | 3673b0b3b729cf4e8f9abe01096ecdfad0ad3d5f (patch) | |
tree | 7f730db892bd083525f111f4f75df2095ee83099 | |
parent | 6dc2bfb1d0c3c020d99197871c596efdeb6208a9 (diff) | |
download | gcc-3673b0b3b729cf4e8f9abe01096ecdfad0ad3d5f.zip gcc-3673b0b3b729cf4e8f9abe01096ecdfad0ad3d5f.tar.gz gcc-3673b0b3b729cf4e8f9abe01096ecdfad0ad3d5f.tar.bz2 |
Fixed unsigned and signed comparision
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc index 30d821f..66b87e3 100644 --- a/gcc/rust/typecheck/rust-tyty.cc +++ b/gcc/rust/typecheck/rust-tyty.cc @@ -193,7 +193,7 @@ ADTType::is_equal (const BaseType &other) const { return false; } - for (int i = 0; i < num_fields (); i++) + for (size_t i = 0; i < num_fields (); i++) { if (!get_field (i)->is_equal (*other2.get_field (i))) { @@ -264,7 +264,7 @@ TupleType::is_equal (const BaseType &other) const { return false; } - for (int i = 0; i < num_fields (); i++) + for (size_t i = 0; i < num_fields (); i++) { if (!get_field (i)->is_equal (*other2.get_field (i))) { @@ -325,7 +325,7 @@ FnType::is_equal (const BaseType &other) const return false; if (num_params () != other2.num_params ()) return false; - for (int i = 0; i < num_params (); i++) + for (size_t i = 0; i < num_params (); i++) { auto lhs = param_at (i).second; auto rhs = other2.param_at (i).second; |