diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-18 21:22:39 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-12-19 15:10:26 +0000 |
| commit | 009cd9c815cd628d973c6247d474f16559d9d5a8 (patch) | |
| tree | 7f6c7122fcbfa1fa083ebc4f79b96fda3530d0aa /compiler/rustc_trait_selection/src/traits | |
| parent | e6d6b1d92cd4641867ce244418af3a5690d853fe (diff) | |
| download | rust-009cd9c815cd628d973c6247d474f16559d9d5a8.tar.gz rust-009cd9c815cd628d973c6247d474f16559d9d5a8.zip | |
Remove unnecessary param-env from lexical region resolution and fully structural relations
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index c7a30535caa..23f7bdd1584 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1226,11 +1226,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { if unbound_input_types && stack.iter().skip(1).any(|prev| { stack.obligation.param_env == prev.obligation.param_env - && self.match_fresh_trait_refs( - stack.fresh_trait_pred, - prev.fresh_trait_pred, - prev.obligation.param_env, - ) + && self.match_fresh_trait_refs(stack.fresh_trait_pred, prev.fresh_trait_pred) }) { debug!("evaluate_stack --> unbound argument, recursive --> giving up",); @@ -2632,9 +2628,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> { &self, previous: ty::PolyTraitPredicate<'tcx>, current: ty::PolyTraitPredicate<'tcx>, - param_env: ty::ParamEnv<'tcx>, ) -> bool { - let mut matcher = MatchAgainstFreshVars::new(self.tcx(), param_env); + let mut matcher = MatchAgainstFreshVars::new(self.tcx()); matcher.relate(previous, current).is_ok() } |
