]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: simplify the is_eq on ADTType
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 25 Jul 2025 16:19:14 +0000 (17:19 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:37:00 +0000 (16:37 +0200)
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>
gcc/rust/typecheck/rust-tyty.cc

index 75370e96c6627abddb040f971b253ec7b27e6d63..4b4117bdb8dd6d8d034a8ee0b70c502e9830f6fd 100644 (file)
@@ -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;
        }