Skip to content

Commit 3a02ebc

Browse files
committed
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.
1 parent f066be5 commit 3a02ebc

File tree

1 file changed

+0
-5
lines changed
  • compiler/rustc_borrowck/src

1 file changed

+0
-5
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ fn do_mir_borrowck<'tcx>(
178178
// Gather the upvars of a closure, if any.
179179
if let Some(e) = input_body.tainted_by_errors {
180180
infcx.set_tainted_by_errors(e);
181-
errors.set_tainted_by_errors(e);
182181
}
183182

184183
// Replace all regions with fresh inference variables. This
@@ -2438,10 +2437,6 @@ mod error {
24382437
pub fn buffer_non_error(&mut self, t: DiagnosticBuilder<'_, ()>) {
24392438
self.buffered.push(t.into_diagnostic());
24402439
}
2441-
2442-
pub fn set_tainted_by_errors(&mut self, e: ErrorGuaranteed) {
2443-
self.tainted_by_errors = Some(e);
2444-
}
24452440
}
24462441

24472442
impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {

0 commit comments

Comments
 (0)