about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-24 03:29:04 +0000
committerbors <bors@rust-lang.org>2022-11-24 03:29:04 +0000
commitfd815a5091eb4d49cd317f8ad272f17b7a5f550d (patch)
tree456c3356e45849e24608f3f61439f7070521177d /compiler/rustc_trait_selection/src
parent872631d0f0fadffe3220ab1bd9c8f1f2342341e2 (diff)
parent701970e0b8941537f3b34381d2cc98940c4e71db (diff)
downloadrust-fd815a5091eb4d49cd317f8ad272f17b7a5f550d.tar.gz
rust-fd815a5091eb4d49cd317f8ad272f17b7a5f550d.zip
Auto merge of #104610 - ouz-a:revert-overflow, r=compiler-errors
Reverts check done by #100757

As my `fix` caused more issues than it resolved it's better to revert it.
( #103274 #104322 https://github.com/rust-lang/rust/issues/104606)

r? `@compiler-errors`

Reopens #95134
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/project.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs
index 9f19b0092c0..7b2329b1ddd 100644
--- a/compiler/rustc_trait_selection/src/traits/project.rs
+++ b/compiler/rustc_trait_selection/src/traits/project.rs
@@ -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,