aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-02-28 05:08:47 +0000
committerEdwin Cheng <[email protected]>2020-02-28 05:08:47 +0000
commitf4e48ad3e45ac5cc4dbbf7919296e576e39a1bb9 (patch)
tree425c4e6acacd67705b65797e6233ccc1f237bb83 /crates/ra_parser
parente0c6e106d9909f34f1b8bbf2b18dee6ece47aa91 (diff)
Parse attr in rhs of let stmts
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index 06c92645e..4163a2cf5 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -169,6 +169,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
169 // let d: i32 = 92; 169 // let d: i32 = 92;
170 // let e: !; 170 // let e: !;
171 // let _: ! = {}; 171 // let _: ! = {};
172 // let f = #[attr]||{};
172 // } 173 // }
173 fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) { 174 fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) {
174 assert!(p.at(T![let])); 175 assert!(p.at(T![let]));
@@ -178,7 +179,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
178 types::ascription(p); 179 types::ascription(p);
179 } 180 }
180 if p.eat(T![=]) { 181 if p.eat(T![=]) {
181 expressions::expr(p); 182 expressions::expr_with_attrs(p);
182 } 183 }
183 184
184 match with_semi { 185 match with_semi {