This repository was archived by the owner on Apr 5, 2024. It is now read-only.
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
Move Upvar lowering from THIR to MIR #25
Closed
Description
We lower paths that start from an Upvar
here.
Essentially what this code does is convert upvars to refer to a field within the desugared ClosureSubsts
. We want to refactor this code as follows:
- Instead of doing the above desugaring we want to return
Thir::Expr::UpvarRef(var_hir_id)
in case the var_hir_id is mentioned within the closure. (This will allow us to deal with thelet _ = x
problem in MIR). - Move the logic currently in
convert_var
torustc_mir_build/as_place
- Maybe remove
Thir::Expr::SelfRef
, it's most likely only for Closures.
Metadata
Metadata
Assignees
Labels
No labels