Skip to content

Commit b3330f8

Browse files
committed
Remove ParamEnv::without_caller_bounds
1 parent ac91805 commit b3330f8

File tree

2 files changed

+1
-7
lines changed
  • compiler
    • rustc_middle/src/ty
    • rustc_trait_selection/src/traits/select

2 files changed

+1
-7
lines changed

Diff for: compiler/rustc_middle/src/ty/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -991,12 +991,6 @@ impl<'tcx> ParamEnv<'tcx> {
991991
ParamEnv { caller_bounds }
992992
}
993993

994-
/// Returns this same environment but with no caller bounds.
995-
#[inline]
996-
pub fn without_caller_bounds(self) -> Self {
997-
Self::new(ListWithCachedTypeInfo::empty())
998-
}
999-
1000994
/// Creates a pair of param-env and value for use in queries.
1001995
pub fn and<T: TypeVisitable<TyCtxt<'tcx>>>(self, value: T) -> ParamEnvAnd<'tcx, T> {
1002996
ParamEnvAnd { param_env: self, value }

Diff for: compiler/rustc_trait_selection/src/traits/select/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10081008
// depend on its particular value in order to work, so we can clear
10091009
// out the param env and get better caching.
10101010
debug!("in global");
1011-
obligation.param_env = obligation.param_env.without_caller_bounds();
1011+
obligation.param_env = ty::ParamEnv::empty();
10121012
}
10131013

10141014
let stack = self.push_stack(previous_stack, &obligation);

0 commit comments

Comments
 (0)