Skip to content

Commit ea139aa

Browse files
committed
gccrs: Only emit errors during type-bounds checking when required
Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-unify.cc (UnifyRules::go): respect the emit_errors flag
1 parent e164f32 commit ea139aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/typecheck/rust-unify.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ UnifyRules::go ()
141141
// check bounds
142142
if (ltype->num_specified_bounds () > 0)
143143
{
144-
if (!ltype->bounds_compatible (*rtype, locus, true))
144+
if (!ltype->bounds_compatible (*rtype, locus, emit_error))
145145
{
146146
// already emitted an error
147147
emit_error = false;

0 commit comments

Comments
 (0)