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.
This commit is contained in:
@@ -1946,6 +1946,7 @@ impl ToOwned for MatchArm {
|
||||
}
|
||||
|
||||
|
||||
impl ast::AttrsOwner for MatchArm {}
|
||||
impl MatchArm {
|
||||
pub fn pats(&self) -> impl Iterator<Item = &Pat> {
|
||||
super::children(self)
|
||||
@@ -1986,6 +1987,7 @@ impl ToOwned for MatchArmList {
|
||||
}
|
||||
|
||||
|
||||
impl ast::AttrsOwner for MatchArmList {}
|
||||
impl MatchArmList {
|
||||
pub fn arms(&self) -> impl Iterator<Item = &MatchArm> {
|
||||
super::children(self)
|
||||
|
||||
Reference in New Issue
Block a user