Use Places to express closure/generator Captures
Co-authored-by: Archer Zhang <archer.xn@gmail.com>
This commit is contained in:
parent
cf9cf7c923
commit
127a6ede1d
6 changed files with 313 additions and 129 deletions
|
@ -387,8 +387,9 @@ fn make_mirror_unadjusted<'a, 'tcx>(
|
|||
}
|
||||
};
|
||||
let upvars = cx
|
||||
.tcx
|
||||
.upvars_mentioned(def_id)
|
||||
.typeck_results()
|
||||
.closure_captures
|
||||
.get(&def_id)
|
||||
.iter()
|
||||
.flat_map(|upvars| upvars.iter())
|
||||
.zip(substs.upvar_tys())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue