Skip to content

ty: map CoroutineClosure and fold nested consts in ReverseMapper#561

Open
SebTardif wants to merge 1 commit into
mainfrom
fix-reverse-mapper-cc-2026
Open

ty: map CoroutineClosure and fold nested consts in ReverseMapper#561
SebTardif wants to merge 1 commit into
mainfrom
fix-reverse-mapper-cc-2026

Conversation

@SebTardif

Copy link
Copy Markdown
Owner

Summary

  • Handle ty::CoroutineClosure in ReverseMapper::fold_ty via fold_closure_args (same as Closure/Coroutine/CoroutineWitness).
  • super_fold_with non-param consts so nested params/regions inside unevaluated/expr consts are remapped.

Closes #469

Test plan

  • Code review vs other ReverseMapper/closure arms
  • ./x.py test compiler/rustc_middle (optional)

RPITIT/opaque reverse mapping handled Closure/Coroutine/CoroutineWitness
but not CoroutineClosure, so async-closure captures in opaque concrete
types skipped special fold_closure_args handling.

Also super_fold non-param consts so nested params/regions inside
unevaluated consts are remapped.

Origin: ReverseMapper fold_ty in opaque_types.rs (pre-CoroutineClosure era gap)
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.

ReverseMapper::fold_ty missing CoroutineClosure arm; fold_const skips super_fold_with

1 participant