@@ -611,19 +611,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
611611 typeck_results. rvalue_scopes = rvalue_scopes;
612612 }
613613
614- /// Unify the inference variables corresponding to coroutine witnesses, and save all the
615- /// predicates that were stalled on those inference variables.
616- ///
617- /// This process allows to conservatively save all predicates that do depend on the coroutine
618- /// interior types, for later processing by `check_coroutine_obligations`.
619- ///
620- /// We must not attempt to select obligations after this method has run, or risk query cycle
621- /// ICE.
614+ /// Drain all obligations that are stalled on coroutines defined in this body.
622615 #[ instrument( level = "debug" , skip( self ) ) ]
623- pub ( crate ) fn resolve_coroutine_interiors ( & self ) {
624- // Try selecting all obligations that are not blocked on inference variables.
625- // Once we start unifying coroutine witnesses, trying to select obligations on them will
626- // trigger query cycle ICEs, as doing so requires MIR.
616+ pub ( crate ) fn drain_stalled_coroutine_obligations ( & self ) {
617+ // Make as much inference progress as possible before
618+ // draining the stalled coroutine obligations as this may
619+ // change obligations from being stalled on infer vars to
620+ // being stalled on a coroutine.
627621 self . select_obligations_where_possible ( |_| { } ) ;
628622
629623 let ty:: TypingMode :: Analysis { defining_opaque_types_and_generators } = self . typing_mode ( )
0 commit comments