Skip to content

Commit c03756a

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 b6c1b63 + b3330f8 commit c03756a

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
@@ -1007,7 +1007,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10071007
// depend on its particular value in order to work, so we can clear
10081008
// out the param env and get better caching.
10091009
debug!("in global");
1010-
obligation.param_env = obligation.param_env.without_caller_bounds();
1010+
obligation.param_env = ty::ParamEnv::empty();
10111011
}
10121012

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

0 commit comments

Comments
 (0)