1
Fork 0

rustc_errors: take self by value in DiagnosticBuilder::cancel.

This commit is contained in:
Eduard-Mihai Burtescu 2022-01-26 03:39:14 +00:00
parent 8562d6b752
commit 0b9d70cf6d
31 changed files with 176 additions and 146 deletions

View file

@ -1598,7 +1598,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
Some((expected, found)) => Some((expected, found)),
None => {
// Derived error. Cancel the emitter.
diag.cancel();
// NOTE(eddyb) this was `.cancel()`, but `diag`
// is borrowed, so we can't fully defuse it.
diag.downgrade_to_delayed_bug();
return;
}
};