Skip to content

Commit 639c30c

Browse files
Remove another instance of the param-env hack
1 parent b89a545 commit 639c30c

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

compiler/rustc_trait_selection/src/traits/select/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -1049,17 +1049,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10491049
previous_stack: TraitObligationStackList<'o, 'tcx>,
10501050
mut obligation: PolyTraitObligation<'tcx>,
10511051
) -> Result<EvaluationResult, OverflowError> {
1052-
if !self.is_intercrate()
1053-
&& obligation.is_global()
1054-
&& obligation.param_env.caller_bounds().iter().all(|bound| bound.has_param())
1055-
{
1056-
// If a param env has no global bounds, global obligations do not
1057-
// depend on its particular value in order to work, so we can clear
1058-
// out the param env and get better caching.
1059-
debug!("in global");
1060-
obligation.param_env = obligation.param_env.without_caller_bounds();
1061-
}
1062-
10631052
let stack = self.push_stack(previous_stack, &obligation);
10641053
let fresh_trait_pred = stack.fresh_trait_pred;
10651054
let param_env = obligation.param_env;

src/tools/cargo

Submodule cargo updated 70 files

0 commit comments

Comments
 (0)