aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-07-25 17:19:14 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2025-08-05 16:37:00 +0200
commiteca63cc3b4d6280892dbdedae942ed49ffcc0b8c (patch)
treea764cfc350874b417732d6773fe482850f8b337a /gcc/rust
parent4dc145a41507f7ee7be87a1f825b67a65437abe4 (diff)
downloadgcc-eca63cc3b4d6280892dbdedae942ed49ffcc0b8c.zip
gcc-eca63cc3b4d6280892dbdedae942ed49ffcc0b8c.tar.gz
gcc-eca63cc3b4d6280892dbdedae942ed49ffcc0b8c.tar.bz2
gccrs: simplify the is_eq on ADTType
We dont need to do this resolve we can just let the ParamType's sort this out. gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (ADTType::is_equal): let param::is_eq do this (FnType::is_equal): remove whitespace Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 75370e9..4b4117b 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -1820,9 +1820,7 @@ ADTType::is_equal (const BaseType &other) const
const ParamType *aa = a.get_param_ty ();
const ParamType *bb = b.get_param_ty ();
- BaseType *aaa = aa->resolve ();
- BaseType *bbb = bb->resolve ();
- if (!aaa->is_equal (*bbb))
+ if (!aa->is_equal (*bb))
return false;
}
}
@@ -2149,7 +2147,6 @@ FnType::is_equal (const BaseType &other) const
const ParamType *pa = a.get_param_ty ();
const ParamType *pb = b.get_param_ty ();
-
if (!pa->is_equal (*pb))
return false;
}