Stash and cancel cycle errors for auto trait leakage in opaques
This commit is contained in:
parent
cf226e93dc
commit
1836c1fbbd
15 changed files with 55 additions and 234 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue