From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id DC2F2385841D; Tue, 28 Feb 2023 22:37:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC2F2385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677623844; bh=5r2CfzilWc+KqI5OvUtf8KCkGh94U39yUtjwK3wm9mo=; h=From:To:Subject:Date:From; b=LP8MCdMHxZ16jTmEKfyFGKM3mzoBpF5tOcv1H8PkbGlD4WayJIURsogl1mhdsDtgL WmvFGkiGjEiuhh8I6OPjfiYK6W3pUucBKiNSeqhn1Yfw45zFlCQmeJNfSfIUYzKD6f IyKiD8gngsKTQkdhfJuBzYvLpKjhDnJSfrmfE46A= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] gccrs: Only emit errors during type-bounds checking when required X-Act-Checkin: gcc X-Git-Author: Philip Herron X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: e164f32df23b309963bf17bf725cd8fcae58d2d5 X-Git-Newrev: ea139aa3818bf07f3ad565dd00889f4caa171c14 Message-Id: <20230228223724.DC2F2385841D@sourceware.org> Date: Tue, 28 Feb 2023 22:37:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ea139aa3818bf07f3ad565dd00889f4caa171c14 commit ea139aa3818bf07f3ad565dd00889f4caa171c14 Author: Philip Herron Date: Mon Feb 27 16:38:41 2023 +0000 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 Diff: --- gcc/rust/typecheck/rust-unify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/typecheck/rust-unify.cc b/gcc/rust/typecheck/rust-unify.cc index 70210aacdcd..e76b362aa0c 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;