]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
gccrs: Only emit errors during type-bounds checking when required
authorPhilip Herron <herron.philip@googlemail.com>
Mon, 27 Feb 2023 16:38:41 +0000 (16:38 +0000)
committerPhilip Herron <philip.herron@embecosm.com>
Tue, 28 Feb 2023 20:38:35 +0000 (20:38 +0000)
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog:

* typecheck/rust-unify.cc (UnifyRules::go): respect the emit_errors flag

gcc/rust/typecheck/rust-unify.cc

index 70210aacdcdbb0ddec816a747f4a7bf116981e70..e76b362aa0c4fd1142fc9ce843a4ad7bf03995ae 100644 (file)
@@ -141,7 +141,7 @@ UnifyRules::go ()
   // check bounds
   if (ltype->num_specified_bounds () > 0)
     {
-      if (!ltype->bounds_compatible (*rtype, locus, true))
+      if (!ltype->bounds_compatible (*rtype, locus, emit_error))
        {
          // already emitted an error
          emit_error = false;