diff options
| author | bors <bors@rust-lang.org> | 2024-02-04 20:51:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-04 20:51:28 +0000 |
| commit | 268dbbbc4b3fd71c5f360a4d0728295252430b5b (patch) | |
| tree | 95b424acf831d9cb5c588b9a41c12590f73891ec /compiler/rustc_trait_selection | |
| parent | 4e3eed48926b8b70eee8beb082e37ffa4985c0ed (diff) | |
| parent | edd24948bc0c4fb47285fb948a2a57fcd84199ed (diff) | |
| download | rust-268dbbbc4b3fd71c5f360a4d0728295252430b5b.tar.gz rust-268dbbbc4b3fd71c5f360a4d0728295252430b5b.zip | |
Auto merge of #120624 - matthiaskrgr:rollup-3gvcl20, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #120484 (Avoid ICE when is_val_statically_known is not of a supported type) - #120516 (pattern_analysis: cleanup manual impls) - #120517 (never patterns: It is correct to lower `!` to `_`.) - #120523 (Improve `io::Read::read_buf_exact` error case) - #120528 (Store SHOULD_CAPTURE as AtomicU8) - #120529 (Update data layouts in custom target tests for LLVM 18) - #120531 (Remove a bunch of `has_errors` checks that have no meaningful or the wrong effect) - #120533 (Correct paths for hexagon-unknown-none-elf platform doc) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index d9c5de17af8..a8715b0764f 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -448,8 +448,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { // FIXME(effects) let predicate_is_const = false; - if let Some(guar) = self.dcx().has_errors() - && trait_predicate.references_error() + if let Err(guar) = trait_predicate.error_reported() { return guar; } @@ -2625,9 +2624,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { if let Some(e) = self.tainted_by_errors() { return e; } - if let Some(e) = self.dcx().has_errors() { - return e; - } self.emit_inference_failure_err( obligation.cause.body_id, @@ -2645,10 +2641,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { if let Some(e) = self.tainted_by_errors() { return e; } - if let Some(e) = self.dcx().has_errors() { - // no need to overload user in such cases - return e; - } let SubtypePredicate { a_is_expected: _, a, b } = data; // both must be type variables, or the other would've been instantiated assert!(a.is_ty_var() && b.is_ty_var()); @@ -2728,10 +2720,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { if let Some(e) = self.tainted_by_errors() { return e; } - if let Some(e) = self.dcx().has_errors() { - // no need to overload user in such cases - return e; - } struct_span_code_err!( self.dcx(), span, |
