Rollup merge of #104554 - BoxyUwU:less_unchecked_pls, r=lcnr
Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less there are only like 3 or 4 call sites left after this but it wasnt obvious to me how to remove them
This commit is contained in:
commit
7f35493e99
23 changed files with 173 additions and 126 deletions
|
@ -115,7 +115,7 @@ pub trait AstConv<'tcx> {
|
|||
/// (e.g., resolve) that is translated into a ty-error. This is
|
||||
/// used to help suppress derived errors typeck might otherwise
|
||||
/// report.
|
||||
fn set_tainted_by_errors(&self);
|
||||
fn set_tainted_by_errors(&self, e: ErrorGuaranteed);
|
||||
|
||||
fn record_ty(&self, hir_id: hir::HirId, ty: Ty<'tcx>, span: Span);
|
||||
}
|
||||
|
@ -2620,8 +2620,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
}
|
||||
}
|
||||
Res::Err => {
|
||||
self.set_tainted_by_errors();
|
||||
self.tcx().ty_error()
|
||||
let e = self
|
||||
.tcx()
|
||||
.sess
|
||||
.delay_span_bug(path.span, "path with `Res:Err` but no error emitted");
|
||||
self.set_tainted_by_errors(e);
|
||||
self.tcx().ty_error_with_guaranteed(e)
|
||||
}
|
||||
_ => span_bug!(span, "unexpected resolution: {:?}", path.res),
|
||||
}
|
||||
|
|
|
@ -518,7 +518,7 @@ impl<'tcx> AstConv<'tcx> for ItemCtxt<'tcx> {
|
|||
ty
|
||||
}
|
||||
|
||||
fn set_tainted_by_errors(&self) {
|
||||
fn set_tainted_by_errors(&self, _: ErrorGuaranteed) {
|
||||
// There's no obvious place to track this, so just let it go.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue