1
Fork 0

Remove ParamEnv::without_caller_bounds

This commit is contained in:
Boxy 2025-02-26 19:41:53 +00:00
parent ac91805f31
commit b3330f8182
2 changed files with 1 additions and 7 deletions

View file

@ -991,12 +991,6 @@ impl<'tcx> ParamEnv<'tcx> {
ParamEnv { caller_bounds } 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. /// 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> { pub fn and<T: TypeVisitable<TyCtxt<'tcx>>>(self, value: T) -> ParamEnvAnd<'tcx, T> {
ParamEnvAnd { param_env: self, value } ParamEnvAnd { param_env: self, value }

View file

@ -1008,7 +1008,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// depend on its particular value in order to work, so we can clear // depend on its particular value in order to work, so we can clear
// out the param env and get better caching. // out the param env and get better caching.
debug!("in global"); 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); let stack = self.push_stack(previous_stack, &obligation);