Skip to content

Commit 4afc540

Browse files
Remove another instance of the param-env hack
1 parent 7040f84 commit 4afc540

File tree

1 file changed

+0
-11
lines changed
  • compiler/rustc_trait_selection/src/traits/select

1 file changed

+0
-11
lines changed

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

-11
Original file line numberDiff line numberDiff line change
@@ -1031,17 +1031,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10311031
previous_stack: TraitObligationStackList<'o, 'tcx>,
10321032
mut obligation: PolyTraitObligation<'tcx>,
10331033
) -> Result<EvaluationResult, OverflowError> {
1034-
if !self.is_intercrate()
1035-
&& obligation.is_global()
1036-
&& obligation.param_env.caller_bounds().iter().all(|bound| bound.has_param())
1037-
{
1038-
// If a param env has no global bounds, global obligations do not
1039-
// depend on its particular value in order to work, so we can clear
1040-
// out the param env and get better caching.
1041-
debug!("in global");
1042-
obligation.param_env = obligation.param_env.without_caller_bounds();
1043-
}
1044-
10451034
let stack = self.push_stack(previous_stack, &obligation);
10461035
let fresh_trait_pred = stack.fresh_trait_pred;
10471036
let param_env = obligation.param_env;

0 commit comments

Comments
 (0)