diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-30 21:59:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-30 21:59:15 +0100 |
commit | a5f2b16366f027ad60c58266a66eb7fbdcbda9f9 (patch) | |
tree | 3a35738bc84ce0dd2902d2394df2adbc8792986e /crates/ra_parser | |
parent | c96b2180c1c4206a0a98c280b4d30897eb116336 (diff) | |
parent | 14126349be47ee28e7feb1ebb2dd1f0392537e56 (diff) |
Merge #4233
4233: Remove dead TryBlock expressio r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 6 | ||||
-rw-r--r-- | crates/ra_parser/src/syntax_kind/generated.rs | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 166dfc472..76aa601cb 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -84,7 +84,7 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar | |||
84 | T![box] => box_expr(p, None), | 84 | T![box] => box_expr(p, None), |
85 | T![for] => for_expr(p, None), | 85 | T![for] => for_expr(p, None), |
86 | T![while] => while_expr(p, None), | 86 | T![while] => while_expr(p, None), |
87 | T![try] => try_block_expr(p, None), | 87 | T![try] => try_expr(p, None), |
88 | LIFETIME if la == T![:] => { | 88 | LIFETIME if la == T![:] => { |
89 | let m = p.start(); | 89 | let m = p.start(); |
90 | label(p); | 90 | label(p); |
@@ -134,7 +134,7 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar | |||
134 | } | 134 | } |
135 | }; | 135 | }; |
136 | let blocklike = match done.kind() { | 136 | let blocklike = match done.kind() { |
137 | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR | BLOCK_EXPR | TRY_BLOCK_EXPR => { | 137 | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR | BLOCK_EXPR | TRY_EXPR => { |
138 | BlockLike::Block | 138 | BlockLike::Block |
139 | } | 139 | } |
140 | _ => BlockLike::NotBlock, | 140 | _ => BlockLike::NotBlock, |
@@ -532,7 +532,7 @@ fn break_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker { | |||
532 | // fn foo() { | 532 | // fn foo() { |
533 | // let _ = try {}; | 533 | // let _ = try {}; |
534 | // } | 534 | // } |
535 | fn try_block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | 535 | fn try_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { |
536 | assert!(p.at(T![try])); | 536 | assert!(p.at(T![try])); |
537 | let m = m.unwrap_or_else(|| p.start()); | 537 | let m = m.unwrap_or_else(|| p.start()); |
538 | // Special-case `try!` as macro. | 538 | // Special-case `try!` as macro. |
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 524e7d784..ab727ed7e 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -191,7 +191,6 @@ pub enum SyntaxKind { | |||
191 | RECORD_LIT, | 191 | RECORD_LIT, |
192 | RECORD_FIELD_LIST, | 192 | RECORD_FIELD_LIST, |
193 | RECORD_FIELD, | 193 | RECORD_FIELD, |
194 | TRY_BLOCK_EXPR, | ||
195 | BOX_EXPR, | 194 | BOX_EXPR, |
196 | CALL_EXPR, | 195 | CALL_EXPR, |
197 | INDEX_EXPR, | 196 | INDEX_EXPR, |