Skip to content

Commit 5c6deaf

Browse files
author
Lukas Markeffsky
committed
delete no-op caching optimization from (old) trait solver
1 parent 6eb9f2d commit 5c6deaf

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,17 +1002,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10021002
previous_stack: TraitObligationStackList<'o, 'tcx>,
10031003
mut obligation: TraitObligation<'tcx>,
10041004
) -> Result<EvaluationResult, OverflowError> {
1005-
if !self.is_intercrate()
1006-
&& obligation.is_global()
1007-
&& obligation.param_env.caller_bounds().iter().all(|bound| bound.needs_subst())
1008-
{
1009-
// If a param env has no global bounds, global obligations do not
1010-
// depend on its particular value in order to work, so we can clear
1011-
// out the param env and get better caching.
1012-
debug!("in global");
1013-
obligation.param_env = obligation.param_env.without_caller_bounds();
1014-
}
1015-
10161005
let stack = self.push_stack(previous_stack, &obligation);
10171006
let mut fresh_trait_pred = stack.fresh_trait_pred;
10181007
let mut param_env = obligation.param_env;

0 commit comments

Comments
 (0)