diff options
| author | bors <bors@rust-lang.org> | 2025-07-20 21:29:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-20 21:29:18 +0000 |
| commit | 460259d14de0274b97b8801e08cb2fe5f16fdac5 (patch) | |
| tree | 5fa58c069e98871e94a13bb49cbf1d2edf02d872 /compiler/rustc_trait_selection/src/traits/select/mod.rs | |
| parent | 9982d6462bedf1e793f7b2dbd655a4e57cdf67d4 (diff) | |
| parent | 1e96d7a55304f8573b6dfeb5ccbdabdb407b89b9 (diff) | |
| download | rust-460259d14de0274b97b8801e08cb2fe5f16fdac5.tar.gz rust-460259d14de0274b97b8801e08cb2fe5f16fdac5.zip | |
Auto merge of #143309 - compiler-errors:param-sized-fast-path, r=lcnr
Consider param-env for sizedness fast path Look up `T: Sized` in param-env if `T` is a param or placeholder (the latter is for use in the new solver).
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/select/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 2b563c5b8d5..f90316f520b 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -597,7 +597,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { None => self.check_recursion_limit(&obligation, &obligation)?, } - if sizedness_fast_path(self.tcx(), obligation.predicate) { + if sizedness_fast_path(self.tcx(), obligation.predicate, obligation.param_env) { return Ok(EvaluatedToOk); } |
