rust/compiler/rustc_mir_build/src
Dylan DPC abaa78baeb
Rollup merge of #78748 - fanzier:tuple-assignment, r=petrochenkov
Implement destructuring assignment for tuples

This is the first step towards implementing destructuring assignment (RFC: https://github.com/rust-lang/rfcs/pull/2909, tracking issue: #71126). This PR is the first part of #71156, which was split up to allow for easier review.

Quick summary: This change allows destructuring the LHS of an assignment if it's a (possibly nested) tuple.
It is implemented via a desugaring (AST -> HIR lowering) as follows:
```rust
(a,b) = (1,2)
```
... becomes ...
```rust
{
  let (lhs0,lhs1) = (1,2);
  a = lhs0;
  b = lhs1;
}
```

Thanks to `@varkor` who helped with the implementation, particularly around default binding modes.

r? `@petrochenkov`
2020-11-09 01:13:44 +01:00
..
build Auto merge of #78638 - vn-ki:bindigs-after-at-issue-69971, r=oli-obk 2020-11-05 13:26:08 +00:00
thir Rollup merge of #78748 - fanzier:tuple-assignment, r=petrochenkov 2020-11-09 01:13:44 +01:00
lib.rs Cache head constructor in PatStack 2020-10-27 00:46:32 +00:00
lints.rs Don't re-export std::ops::ControlFlow in the compiler. 2020-10-22 17:26:55 -07:00