From f4e48ad3e45ac5cc4dbbf7919296e576e39a1bb9 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 28 Feb 2020 13:08:47 +0800 Subject: Parse attr in rhs of let stmts --- crates/ra_parser/src/grammar/expressions.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_parser/src') 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) { // let d: i32 = 92; // let e: !; // let _: ! = {}; + // let f = #[attr]||{}; // } fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) { assert!(p.at(T![let])); @@ -178,7 +179,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { types::ascription(p); } if p.eat(T![=]) { - expressions::expr(p); + expressions::expr_with_attrs(p); } match with_semi { -- cgit v1.2.3