diff options
| author | Michael Goulet <michael@errs.io> | 2025-04-22 23:31:22 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-04-23 15:09:25 +0000 |
| commit | f943f73db4791d64ff83d72986da8d6250c42933 (patch) | |
| tree | 4474dcc7ba139e0d9f70a7754c31694fcf7186ee /compiler/rustc_middle/src/ty/context.rs | |
| parent | 7c1661f9457825df6e6bbf4869be3cad59b608a9 (diff) | |
| download | rust-f943f73db4791d64ff83d72986da8d6250c42933.tar.gz rust-f943f73db4791d64ff83d72986da8d6250c42933.zip | |
More
Diffstat (limited to 'compiler/rustc_middle/src/ty/context.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index f5872f0269e..98057a25f04 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -678,11 +678,18 @@ impl<'tcx> Interner for TyCtxt<'tcx> { self.opaque_types_defined_by(defining_anchor) } - fn stalled_generators_within(self, defining_anchor: Self::LocalDefId) -> Self::LocalDefIds { + fn opaque_types_and_generators_defined_by( + self, + defining_anchor: Self::LocalDefId, + ) -> Self::LocalDefIds { if self.next_trait_solver_globally() { - self.stalled_generators_within(defining_anchor) + self.mk_local_def_ids_from_iter( + self.opaque_types_defined_by(defining_anchor) + .iter() + .chain(self.stalled_generators_within(defining_anchor)), + ) } else { - ty::List::empty() + self.opaque_types_defined_by(defining_anchor) } } } @@ -2914,11 +2921,11 @@ impl<'tcx> TyCtxt<'tcx> { self.interners.intern_clauses(clauses) } - pub fn mk_local_def_ids(self, clauses: &[LocalDefId]) -> &'tcx List<LocalDefId> { + pub fn mk_local_def_ids(self, def_ids: &[LocalDefId]) -> &'tcx List<LocalDefId> { // FIXME consider asking the input slice to be sorted to avoid // re-interning permutations, in which case that would be asserted // here. - self.intern_local_def_ids(clauses) + self.intern_local_def_ids(def_ids) } pub fn mk_local_def_ids_from_iter<I, T>(self, iter: I) -> T::Output |
