diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-28 09:23:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-28 09:23:41 +0000 |
commit | 553353e3160c589ee4b77bd30fa5bbd6df5e0e70 (patch) | |
tree | 192fbf2191946a1d0bdb276173033d077d9fefd0 /crates/ra_parser/src | |
parent | 4741ae785257bc894cd9a61c1d5e6479074c69b6 (diff) | |
parent | f4e48ad3e45ac5cc4dbbf7919296e576e39a1bb9 (diff) |
Merge #3360
3360: Parse attribues in RHS of let statments r=matklad a=edwin0cheng
Fixed #3315
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 3 |
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 { |