diff options
| author | lcnr <rust@lcnr.de> | 2022-10-31 10:27:51 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-11-08 14:48:07 +0100 |
| commit | 003ed76e41e9b8247d2b2fc040da76969e86d4a6 (patch) | |
| tree | ff356e5f22e13ca16a976212100e7c84b5976875 | |
| parent | f1551bfc02845eb198a71cc5c0264bd71e336274 (diff) | |
| download | rust-003ed76e41e9b8247d2b2fc040da76969e86d4a6.tar.gz rust-003ed76e41e9b8247d2b2fc040da76969e86d4a6.zip | |
delay errors as bug
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 4 |
1 files 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 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { 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 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { } _ => { if self.is_tainted_by_errors() { - err.cancel(); + err.delay_as_bug(); return; } err.note(&format!("cannot satisfy `{}`", predicate)); |
