diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/parser.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 99e32c4e8..795dccea1 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -137,12 +137,14 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { | |||
137 | m.complete(p, EXPR_STMT); | 137 | m.complete(p, EXPR_STMT); |
138 | } | 138 | } |
139 | 139 | ||
140 | // test let_stmt; | 140 | // test let_stmt |
141 | // fn foo() { | 141 | // fn foo() { |
142 | // let a; | 142 | // let a; |
143 | // let b: i32; | 143 | // let b: i32; |
144 | // let c = 92; | 144 | // let c = 92; |
145 | // let d: i32 = 92; | 145 | // let d: i32 = 92; |
146 | // let e: !; | ||
147 | // let _: ! = {}; | ||
146 | // } | 148 | // } |
147 | fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) { | 149 | fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) { |
148 | assert!(p.at(T![let])); | 150 | assert!(p.at(T![let])); |
diff --git a/crates/ra_parser/src/parser.rs b/crates/ra_parser/src/parser.rs index 8f654f04c..8a2e253ac 100644 --- a/crates/ra_parser/src/parser.rs +++ b/crates/ra_parser/src/parser.rs | |||
@@ -272,7 +272,7 @@ impl<'t> Parser<'t> { | |||
272 | T![=] if jn1 && la2 == T![=] => Some((T![==], 2)), | 272 | T![=] if jn1 && la2 == T![=] => Some((T![==], 2)), |
273 | T![=] if jn1 && la2 == T![>] => Some((T![=>], 2)), | 273 | T![=] if jn1 && la2 == T![>] => Some((T![=>], 2)), |
274 | 274 | ||
275 | T![!] if la2 == T![=] => Some((T![!=], 2)), | 275 | T![!] if jn1 && la2 == T![=] => Some((T![!=], 2)), |
276 | T![-] if la2 == T![>] => Some((T![->], 2)), | 276 | T![-] if la2 == T![>] => Some((T![->], 2)), |
277 | _ => None, | 277 | _ => None, |
278 | } | 278 | } |