mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
7fa991fb85
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`````` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |