revert-overflow
This commit is contained in:
parent
2a434286a9
commit
90128c30a0
5 changed files with 8 additions and 55 deletions
|
@ -566,22 +566,6 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
|
|||
.flatten()
|
||||
.unwrap_or_else(|| ty.super_fold_with(self).into())
|
||||
};
|
||||
// For cases like #95134 we would like to catch overflows early
|
||||
// otherwise they slip away and cause ICE.
|
||||
let recursion_limit = self.tcx().recursion_limit();
|
||||
if !recursion_limit.value_within_limit(self.depth)
|
||||
// HACK: Don't overflow when running cargo doc see #100991
|
||||
&& !self.tcx().sess.opts.actually_rustdoc
|
||||
{
|
||||
let obligation = Obligation::with_depth(
|
||||
self.selcx.tcx(),
|
||||
self.cause.clone(),
|
||||
recursion_limit.0,
|
||||
self.param_env,
|
||||
ty,
|
||||
);
|
||||
self.selcx.infcx().err_ctxt().report_overflow_error(&obligation, true);
|
||||
}
|
||||
debug!(
|
||||
?self.depth,
|
||||
?ty,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue