diff options
| author | bors <bors@rust-lang.org> | 2025-07-17 20:02:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-17 20:02:22 +0000 |
| commit | e4662966273ed58b51f9ff8d682accc202aa1210 (patch) | |
| tree | 560236eb5364c796927d944154fa6aa5a3837717 /compiler/rustc_middle/src | |
| parent | 9cd918bcbbc26deb005eb4e1bd9a445380195e56 (diff) | |
| parent | 216cdb7b22b637cef75b7225c642cb7587192643 (diff) | |
| download | rust-e4662966273ed58b51f9ff8d682accc202aa1210.tar.gz rust-e4662966273ed58b51f9ff8d682accc202aa1210.zip | |
Auto merge of #141762 - compiler-errors:witnesser, r=lcnr
Unify `CoroutineWitness` sooner in typeck, and stall coroutine obligations based off of `TypingEnv` * Stall coroutine obligations based off of `TypingMode` in the old solver. * Eagerly assign `TyKind::CoroutineWitness` to the witness arg of coroutines during typeck, rather than deferring them to the end of typeck. r? lcnr This is part of https://github.com/rust-lang/rust/issues/143017.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 915b062417f..684d13e147e 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -714,17 +714,13 @@ impl<'tcx> Interner for TyCtxt<'tcx> { self, defining_anchor: Self::LocalDefId, ) -> Self::LocalDefIds { - if self.next_trait_solver_globally() { - let coroutines_defined_by = self - .nested_bodies_within(defining_anchor) - .iter() - .filter(|def_id| self.is_coroutine(def_id.to_def_id())); - self.mk_local_def_ids_from_iter( - self.opaque_types_defined_by(defining_anchor).iter().chain(coroutines_defined_by), - ) - } else { - self.opaque_types_defined_by(defining_anchor) - } + let coroutines_defined_by = self + .nested_bodies_within(defining_anchor) + .iter() + .filter(|def_id| self.is_coroutine(def_id.to_def_id())); + self.mk_local_def_ids_from_iter( + self.opaque_types_defined_by(defining_anchor).iter().chain(coroutines_defined_by), + ) } } |
