Skip to content

Commit 1bb9711

Browse files
committed
swap order of resolve_coroutine_interiors and handle_opaque_type_uses
1 parent b927b94 commit 1bb9711

File tree

1 file changed

+5
-5
lines changed
  • compiler/rustc_hir_typeck/src

1 file changed

+5
-5
lines changed

compiler/rustc_hir_typeck/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,17 @@ fn typeck_with_inspect<'tcx>(
243243

244244
debug!(pending_obligations = ?fcx.fulfillment_cx.borrow().pending_obligations());
245245

246-
// This must be the last thing before `report_ambiguity_errors`.
247-
fcx.resolve_coroutine_interiors();
248-
249-
debug!(pending_obligations = ?fcx.fulfillment_cx.borrow().pending_obligations());
250-
251246
// We need to handle opaque types before emitting ambiguity errors as applying
252247
// defining uses may guide type inference.
253248
if fcx.next_trait_solver() {
254249
fcx.handle_opaque_type_uses_next();
255250
}
256251

252+
// This must be the last thing before `report_ambiguity_errors`.
253+
fcx.resolve_coroutine_interiors();
254+
255+
debug!(pending_obligations = ?fcx.fulfillment_cx.borrow().pending_obligations());
256+
257257
fcx.select_obligations_where_possible(|_| {});
258258
if fcx.infcx.tainted_by_errors().is_none() {
259259
fcx.report_ambiguity_errors();

0 commit comments

Comments
 (0)