]> git.lizzy.rs Git - rust.git/commitdiff
Move capture lowering from THIR to MIR
authorAman Arora <me@aman-arora.com>
Tue, 17 Nov 2020 06:52:14 +0000 (01:52 -0500)
committerAman Arora <me@aman-arora.com>
Tue, 17 Nov 2020 22:49:42 +0000 (17:49 -0500)
This allows us to:
- Handle precise Places captured by a closure directly in MIR. Handling
captures in MIR is easier since we can rely on/ tweak PlaceBuilder to
generate `mir::Place`s that resemble how we store captures (`hir::Place`).
- Allows us to handle `let _ = x` case when feature `capture_disjoint_fields`
is enabled directly in MIR. This is required to be done in MIR since
patterns are desugared in MIR.


No differences found