Skip to content

Commit 0dcd814

Browse files
authored
Rollup merge of rust-lang#137800 - BoxyUwU:param_env_docs, r=compiler-errors
Remove `ParamEnv::without_caller_bounds` This doesn't really do anything that `ParamEnv::empty` doesn't do nowadays as `ParamEnv` *only* stores caller bounds since other information has been moved out into `TypingMode` r? `@compiler-errors` `@lcnr`
2 parents 48ba844 + b3330f8 commit 0dcd814

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

compiler/rustc_middle/src/ty/mod.rs

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

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

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)