Skip to content

hir_analysis: collect CoroutineClosure in OpaqueTypeCollector#577

Open
SebTardif wants to merge 1 commit into
mainfrom
fix-r71-opaque-collector-coroutine-closure
Open

hir_analysis: collect CoroutineClosure in OpaqueTypeCollector#577
SebTardif wants to merge 1 commit into
mainfrom
fix-r71-opaque-collector-coroutine-closure

Conversation

@SebTardif

Copy link
Copy Markdown
Owner

Summary

OpaqueTypeCollector in check.rs walks Closure and Coroutine to record their def_ids and recurse, but missed CoroutineClosure. Async closures can embed nested opaques in signatures/upvars; include them in the visitor.

Closes #483

Origin

Collector arm dates from the Generator/Coroutine rename era:

rust-lang@6095683

CoroutineClosure added later:

rust-lang@c567edd

Test plan

  • Pattern matches prior fix-opaque-type-collector-coroutine-closure fix (e2614fc)
  • Code review vs sibling CoroutineClosure sweeps

Async closures can embed opaque types in their signatures and upvars.
Walk CoroutineClosure like Closure/Coroutine so nested opaques are found.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpaqueTypeCollector missing CoroutineClosure, async closure def_ids not collected

1 participant