Skip to content

Commit 5f09e4f

Browse files
w
1 parent f5cfc52 commit 5f09e4f

File tree

1 file changed

+7
-4
lines changed
  • compiler/rustc_trait_selection/src/solve

1 file changed

+7
-4
lines changed

compiler/rustc_trait_selection/src/solve/fulfill.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use rustc_infer::traits::{
1010
FromSolverError, PredicateObligation, PredicateObligations, TraitEngine,
1111
};
1212
use rustc_middle::ty::{
13-
self, DelayedSet, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor, TypingMode,
13+
self, DelayedSet, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor,
14+
TypingMode,
1415
};
1516
use rustc_next_trait_solver::delegate::SolverDelegate as _;
1617
use rustc_next_trait_solver::solve::{
@@ -342,10 +343,12 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for StalledOnCoroutines<'tcx> {
342343
if let ty::CoroutineWitness(def_id, _) = *ty.kind()
343344
&& def_id.as_local().is_some_and(|def_id| self.stalled_coroutines.contains(&def_id))
344345
{
345-
return ControlFlow::Break(());
346+
ControlFlow::Break(())
347+
} else if ty.has_coroutines() {
348+
ty.super_visit_with(self)
349+
} else {
350+
ControlFlow::Continue(())
346351
}
347-
348-
ty.super_visit_with(self)
349352
}
350353
}
351354

0 commit comments

Comments
 (0)