Rollup merge of #120531 - oli-obk:track_errors7, r=estebank
Remove a bunch of `has_errors` checks that have no meaningful or the wrong effect r? `@nnethercote`
This commit is contained in:
commit
7d516c57df
20 changed files with 121 additions and 38 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue