From 003ed76e41e9b8247d2b2fc040da76969e86d4a6 Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 31 Oct 2022 10:27:51 +0100 Subject: [PATCH] delay errors as bug --- .../rustc_trait_selection/src/traits/error_reporting/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index bcb00796cba..0f5d05afcf8 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -2146,7 +2146,7 @@ fn maybe_report_ambiguity( self.annotate_source_of_ambiguity(&mut err, &impls, predicate); } else { if self.is_tainted_by_errors() { - err.cancel(); + err.delay_as_bug(); return; } err.note(&format!("cannot satisfy `{}`", predicate)); @@ -2154,7 +2154,7 @@ fn maybe_report_ambiguity( } _ => { if self.is_tainted_by_errors() { - err.cancel(); + err.delay_as_bug(); return; } err.note(&format!("cannot satisfy `{}`", predicate));