diff options
Diffstat (limited to 'crates/mbe/src/lib.rs')
-rw-r--r-- | crates/mbe/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index b95374b76..380a50744 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs | |||
@@ -295,8 +295,8 @@ fn validate(pattern: &MetaTemplate) -> Result<(), ParseError> { | |||
295 | // Checks that no repetition which could match an empty token | 295 | // Checks that no repetition which could match an empty token |
296 | // https://github.com/rust-lang/rust/blob/a58b1ed44f5e06976de2bdc4d7dc81c36a96934f/src/librustc_expand/mbe/macro_rules.rs#L558 | 296 | // https://github.com/rust-lang/rust/blob/a58b1ed44f5e06976de2bdc4d7dc81c36a96934f/src/librustc_expand/mbe/macro_rules.rs#L558 |
297 | 297 | ||
298 | if separator.is_none() { | 298 | if separator.is_none() |
299 | if subtree.iter().all(|child_op| { | 299 | && subtree.iter().all(|child_op| { |
300 | match child_op { | 300 | match child_op { |
301 | Op::Var { kind, .. } => { | 301 | Op::Var { kind, .. } => { |
302 | // vis is optional | 302 | // vis is optional |
@@ -314,9 +314,9 @@ fn validate(pattern: &MetaTemplate) -> Result<(), ParseError> { | |||
314 | Op::Subtree { .. } => {} | 314 | Op::Subtree { .. } => {} |
315 | } | 315 | } |
316 | false | 316 | false |
317 | }) { | 317 | }) |
318 | return Err(ParseError::RepetitionEmptyTokenTree); | 318 | { |
319 | } | 319 | return Err(ParseError::RepetitionEmptyTokenTree); |
320 | } | 320 | } |
321 | validate(subtree)? | 321 | validate(subtree)? |
322 | } | 322 | } |