diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-02-26 19:41:53 +0000 |
|---|---|---|
| committer | Boxy <rust@boxyuwu.dev> | 2025-02-26 19:41:53 +0000 |
| commit | b3330f81824b2266de07c647df2c72245f90f5ad (patch) | |
| tree | c1975cccbcaf6cb75322025f788ca53778f422e0 | |
| parent | ac91805f3179fc2225c60e8ccf5a1daa09d43f3d (diff) | |
| download | rust-b3330f81824b2266de07c647df2c72245f90f5ad.tar.gz rust-b3330f81824b2266de07c647df2c72245f90f5ad.zip | |
Remove `ParamEnv::without_caller_bounds`
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index eb70a35d370..bb4275fbcef 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -991,12 +991,6 @@ impl<'tcx> ParamEnv<'tcx> { ParamEnv { caller_bounds } } - /// Returns this same environment but with no caller bounds. - #[inline] - pub fn without_caller_bounds(self) -> Self { - Self::new(ListWithCachedTypeInfo::empty()) - } - /// Creates a pair of param-env and value for use in queries. pub fn and<T: TypeVisitable<TyCtxt<'tcx>>>(self, value: T) -> ParamEnvAnd<'tcx, T> { ParamEnvAnd { param_env: self, value } diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 436ce3dddd9..d5e7a9eba13 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1008,7 +1008,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // 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(); + obligation.param_env = ty::ParamEnv::empty(); } let stack = self.push_stack(previous_stack, &obligation); |
