rust/crates/syntax/src
bors[bot] 8f504dc873
Merge #11598
11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2

Part of #11532.

Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into
```rust
{
    let (<gensym_a>, <gensym_b>) = (b, a);
    a = <gensym_a>;
    b = <gensym_b>;
}
```

rustc uses hygiene to implement that, but we don't support hygiene yet.

However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error.

I'm still looking for the best way to do lowering, though.

Fixes #11454.

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2022-03-05 11:31:29 +00:00
..
ast Merge #11598 2022-03-05 11:31:29 +00:00
parsing dead code 2021-12-28 19:13:30 +03:00
tests Merge #11598 2022-03-05 11:31:29 +00:00
validation Add semicolons for consistency 2021-10-03 23:39:43 +11:00
algo.rs Make selections in assists with trailing/leading whitespace more forgiving 2021-10-12 14:41:59 +02:00
ast.rs Preserve order of generic args 2022-03-04 11:46:14 +03:30
display.rs Fully render type alias completions from hir 2021-12-21 16:36:23 +01:00
fuzz.rs Add more docs 2021-05-22 16:53:47 +03:00
hacks.rs dead code 2021-12-28 19:13:30 +03:00
lib.rs fix(11422): have two different funuctions - one for iterating breaks, one for iteraating breaks and continues 2022-02-24 19:00:08 +01:00
parsing.rs dead code 2021-12-28 19:13:30 +03:00
ptr.rs Migrate to SyntaxNodePtr in new rowan 2021-12-29 23:48:53 -08:00
syntax_error.rs Rename ra_syntax -> syntax 2020-08-12 18:30:53 +02:00
syntax_node.rs internal: replace TreeSink with a data structure 2021-12-25 22:02:26 +03:00
ted.rs Add semicolons for consistency 2021-10-03 23:39:43 +11:00
tests.rs remove fragments from syntax 2021-12-28 17:00:55 +03:00
token_text.rs Imrove fn name computation in Generate function 2021-09-16 21:03:37 +05:00
utils.rs Better strip turbofishes 2021-03-08 23:59:39 +02:00
validation.rs Validate let expressions 2022-02-21 08:34:35 +02:00