rust-analyzer/crates
bors[bot] 7a025ad201 Merge #93
93: Support leading pipe in match arms r=matklad a=DJMcNab

This adds support for match arms of the form:
```rust
<...>
| X | Y => <...>,
| X => <...>,
| 1..2 => <...>,
etc
```

# Implementation discussion

This just naïvely 'eats' a leading pipe if one is available. The equivalent line in the reference `libsyntax` is in [`parse_arm`](441519536c/src/libsyntax/parse/parser.rs (L3552)).

As noted in the comment linked above, this feature was formally introduced as a result of rust-lang/rfcs#1925. This feature is in active use in the [`rust-analyzer` codebase](c87fcb4ea5/crates/ra_syntax/src/syntax_kinds/generated.rs (L231))

I have added some tests for this feature, but maybe more would be required

EDIT: Always looking for feedback - is this PR description over-engineered?

Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
2018-10-04 07:02:19 +00:00
..
gen_lsp_server Support LSP 3.13 2018-09-23 11:10:57 -04:00
ra_analysis Split folding ranges into editor and lsp parts 2018-09-24 09:52:33 -04:00
ra_cli Add emacs function for extend shirnk selection 2018-09-19 00:46:10 +03:00
ra_editor Make siblings an inherent method 2018-10-02 18:14:33 +03:00
ra_lsp_server fix code actions 2018-09-29 21:59:34 +03:00
ra_syntax Merge #93 2018-10-04 07:02:19 +00:00
salsa yet another db api 2018-09-16 00:00:05 +03:00
test_utils move 2018-08-25 14:30:54 +03:00
tools rename all things 2018-09-16 13:07:39 +03:00