From a313761b2f506093b8ed8134338b935f968ca380 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Mon, 27 Feb 2023 16:38:41 +0000 Subject: gccrs: Only emit errors during type-bounds checking when required Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-unify.cc (UnifyRules::go): respect the emit_errors flag --- gcc/rust/typecheck/rust-unify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/rust/typecheck/rust-unify.cc b/gcc/rust/typecheck/rust-unify.cc index bdee48b..dcd1783 100644 --- a/gcc/rust/typecheck/rust-unify.cc +++ b/gcc/rust/typecheck/rust-unify.cc @@ -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; -- cgit v1.1