From 1c97c1ac11459d45f7bfc57dc72428d2b294520c Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Sun, 17 Feb 2019 19:08:34 +0200 Subject: Enable parsing of attributes inside a match block We allow invalid inner attributes to be parsed, e.g. inner attributes that are not directly after the opening brace of the match block. Instead we run validation on `MatchArmList` to allow better reporting of errors. --- crates/ra_syntax/src/ast/generated.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index dd91b5063..c7aaccc95 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -1946,6 +1946,7 @@ impl ToOwned for MatchArm { } +impl ast::AttrsOwner for MatchArm {} impl MatchArm { pub fn pats(&self) -> impl Iterator { super::children(self) @@ -1986,6 +1987,7 @@ impl ToOwned for MatchArmList { } +impl ast::AttrsOwner for MatchArmList {} impl MatchArmList { pub fn arms(&self) -> impl Iterator { super::children(self) -- cgit v1.2.3