diff options
| author | Michael Goulet <michael@errs.io> | 2025-07-18 18:17:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-31 17:31:51 +0000 |
| commit | d525e79157e32abc510714dd32628c9c155f2997 (patch) | |
| tree | ea87e96a67f6c624ec0979aac0d6a99030d8a89c /compiler/rustc_next_trait_solver | |
| parent | 3fb1b53a9dbfcdf37a4b67d35cde373316829930 (diff) | |
| download | rust-d525e79157e32abc510714dd32628c9c155f2997.tar.gz rust-d525e79157e32abc510714dd32628c9c155f2997.zip | |
Stall coroutines based off of ty::Coroutine, not ty::CoroutineWitness
Diffstat (limited to 'compiler/rustc_next_trait_solver')
| -rw-r--r-- | compiler/rustc_next_trait_solver/src/solve/trait_goals.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index 650b85d99d2..31991565b0d 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -229,7 +229,7 @@ where } // We need to make sure to stall any coroutines we are inferring to avoid query cycles. - if let Some(cand) = ecx.try_stall_coroutine_witness(goal.predicate.self_ty()) { + if let Some(cand) = ecx.try_stall_coroutine(goal.predicate.self_ty()) { return cand; } @@ -294,7 +294,7 @@ where } // We need to make sure to stall any coroutines we are inferring to avoid query cycles. - if let Some(cand) = ecx.try_stall_coroutine_witness(goal.predicate.self_ty()) { + if let Some(cand) = ecx.try_stall_coroutine(goal.predicate.self_ty()) { return cand; } @@ -1432,11 +1432,8 @@ where self.merge_trait_candidates(candidates) } - fn try_stall_coroutine_witness( - &mut self, - self_ty: I::Ty, - ) -> Option<Result<Candidate<I>, NoSolution>> { - if let ty::CoroutineWitness(def_id, _) = self_ty.kind() { + fn try_stall_coroutine(&mut self, self_ty: I::Ty) -> Option<Result<Candidate<I>, NoSolution>> { + if let ty::Coroutine(def_id, _) = self_ty.kind() { match self.typing_mode() { TypingMode::Analysis { defining_opaque_types_and_generators: stalled_generators, |
