rust/compiler/rustc_span/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
..
analyze_source_file mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
source_map mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
symbol mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
analyze_source_file.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
caching_source_map_view.rs rustc_span: represent line bounds with Range 2020-10-27 15:47:29 -07:00
def_id.rs Add some docs to rustdoc::clean::inline and def_id functions 2020-10-06 09:46:00 +00:00
edition.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
fatal_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
hygiene.rs Show the inline stack of MIR lints that only occur after inlining 2020-10-27 14:08:07 +00:00
lib.rs fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
source_map.rs Use RwLock instead of Lock for SourceMap::files 2020-10-29 18:09:53 +01:00
span_encoding.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
symbol.rs Implement destructuring assignment for tuples 2020-11-07 13:17:19 +00:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00