Skip to content

Commit

Permalink
Rollup merge of rust-lang#77274 - tmiasko:liveness-cnd, r=lcnr
Browse files Browse the repository at this point in the history
Liveness refactoring continued

* Move body_owner field from IrMaps to Liveness (the only user of the field).
* Use upvars instead of FnKind to check for closures (avoids FnKind, will be useful when checking all bodies, not just fns).
* Use visit_param to add variables corresponding to params.
* Store upvars_mentioned inside Liveness struct.
* Inline visitor implementation for IrMaps, avoiding unnecessary indirection.
* Test interaction with automatically_derived attribute (not covered by any of existing tests).

No functional changes intended.
  • Loading branch information
Dylan-DPC authored Sep 28, 2020
2 parents 275096e + 063d5e9 commit c789c5e
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 218 deletions.
Loading

0 comments on commit c789c5e

Please sign in to comment.