-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't erroneously deny semicolons after closure expr within parenthes…
…es in a macro
- Loading branch information
1 parent
eecde58
commit 3d7b1f0
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// check-pass | ||
|
||
// Checks that the fix in #103222 doesn't also disqualify semicolons after | ||
// closures within parentheses *in macros*, where they're totally allowed. | ||
|
||
macro_rules! m { | ||
(($expr:expr ; )) => { | ||
$expr | ||
}; | ||
} | ||
|
||
fn main() { | ||
let x = m!(( ||() ; )); | ||
} |