1
Fork 0

Stash and cancel cycle errors for auto trait leakage in opaques

This commit is contained in:
Michael Goulet 2023-10-26 17:30:53 +00:00
parent cf226e93dc
commit 1836c1fbbd
15 changed files with 55 additions and 234 deletions

View file

@ -3071,6 +3071,13 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
);
}
};
if let Some(diag) =
self.tcx.sess.diagnostic().steal_diagnostic(self.tcx.def_span(def_id), StashKey::Cycle)
{
diag.cancel();
}
err
}