From 639c30c34b5c20301c63994dde4f6a228f44aca8 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 12 Oct 2023 09:24:01 +0000 Subject: [PATCH] Remove another instance of the param-env hack --- .../rustc_trait_selection/src/traits/select/mod.rs | 11 ----------- src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- src/tools/cargo | 2 +- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 8871de194a634..040dd9b660f34 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1049,17 +1049,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { previous_stack: TraitObligationStackList<'o, 'tcx>, mut obligation: PolyTraitObligation<'tcx>, ) -> Result { - if !self.is_intercrate() - && obligation.is_global() - && obligation.param_env.caller_bounds().iter().all(|bound| bound.has_param()) - { - // If a param env has no global bounds, global obligations do not - // depend on its particular value in order to work, so we can clear - // out the param env and get better caching. - debug!("in global"); - obligation.param_env = obligation.param_env.without_caller_bounds(); - } - let stack = self.push_stack(previous_stack, &obligation); let fresh_trait_pred = stack.fresh_trait_pred; let param_env = obligation.param_env; diff --git a/src/doc/reference b/src/doc/reference index 142b2ed77d33f..5262e1c3b43a2 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 142b2ed77d33f37a9973772bd95e6144ed9dce43 +Subproject commit 5262e1c3b43a2c489df8f6717683a44c7a2260fd diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 8eb3a01ab74c5..c954202c1e172 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 8eb3a01ab74c567b7174784892fb807f2c632d6b +Subproject commit c954202c1e1720cba5628f99543cc01188c7d6fc diff --git a/src/tools/cargo b/src/tools/cargo index 6fa6fdc7606cf..794d0a82547f3 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit 6fa6fdc7606cfa664f9bee2fb33ee2ed904f4e88 +Subproject commit 794d0a82547f3081044c0aca7b6083733ce51344