rust/compiler/rustc_mir_build/src/build
Yuki Okushi 7fa991fb85
Rollup merge of #81291 - sexxi-goose:fix-struct-update-functional-record-update-syntax-error, r=nikomatsakis
Support FRU pattern with `[feature(capture_disjoint_fields)]`

In case of a functional record update syntax for creating a structure, `ExprUseVisitor` to only detect the precise use of some of the field in the `..x` part of the syntax. However, when we start building MIR, we
1. First, build the place for `x`
2. and then, add precise field projections so that only some parts of `x` end up getting read.

When `capture_disjoint_fields` is enabled, and FRU is used within a closure `x` won't be completely captured, and therefore the first step will fail. This PR updates `mir_build` to create a place builder in the first step and then create place from the builder only after applying the field projection.

Closes https://github.com/rust-lang/project-rfc-2229/issues/32
r? ``````@nikomatsakis``````
2021-01-30 13:36:46 +09:00
..
expr Rollup merge of #81291 - sexxi-goose:fix-struct-update-functional-record-update-syntax-error, r=nikomatsakis 2021-01-30 13:36:46 +09:00
matches Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis 2021-01-28 15:09:02 +09:00
block.rs Avoid leaking block expression values 2020-12-04 23:07:46 +00:00
cfg.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
into.rs Avoid leaking block expression values 2020-12-04 23:07:46 +00:00
misc.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
mod.rs Rename kw::Invalid -> kw::Empty 2020-12-30 09:50:02 -05:00
scope.rs Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasper 2020-12-17 11:43:55 +09:00