Remove BorrowckErrors::set_tainted_by_errors.

It has no effect. Note that `infcx.set_tainted_by_errors()` is still
called, so taintedness is still being propagated.
This commit is contained in:
Nicholas Nethercote 2024-02-02 09:05:53 +11:00
parent f066be5f29
commit 3a02ebcac2

View file

@ -178,7 +178,6 @@ fn do_mir_borrowck<'tcx>(
// Gather the upvars of a closure, if any.
if let Some(e) = input_body.tainted_by_errors {
infcx.set_tainted_by_errors(e);
errors.set_tainted_by_errors(e);
}
// Replace all regions with fresh inference variables. This
@ -2438,10 +2437,6 @@ mod error {
pub fn buffer_non_error(&mut self, t: DiagnosticBuilder<'_, ()>) {
self.buffered.push(t.into_diagnostic());
}
pub fn set_tainted_by_errors(&mut self, e: ErrorGuaranteed) {
self.tainted_by_errors = Some(e);
}
}
impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {