forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#74846 - Aaron1011:fix/pat-token-capture, r=pe…
…trochenkov Capture tokens for Pat used in macro_rules! argument This extends PR rust-lang#73293 to handle patterns (Pat). Unlike expressions, patterns do not support custom attributes, so we only need to capture tokens during macro_rules! argument parsing.
- Loading branch information
Showing
13 changed files
with
85 additions
and
10 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
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
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
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
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
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,41 @@ | ||
PRINT-BANG INPUT (DISPLAY): self | ||
PRINT-BANG INPUT (DEBUG): TokenStream [ | ||
Group { | ||
delimiter: None, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "self", | ||
span: $DIR/capture-macro-rules-invoke.rs:26:24: 26:28 (#CTXT), | ||
}, | ||
], | ||
span: $DIR/capture-macro-rules-invoke.rs:11:21: 11:26 (#CTXT), | ||
}, | ||
] | ||
PRINT-BANG INPUT (DISPLAY): (a, b) | ||
PRINT-BANG INPUT (DEBUG): TokenStream [ | ||
Group { | ||
delimiter: None, | ||
stream: TokenStream [ | ||
Group { | ||
delimiter: Parenthesis, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "a", | ||
span: $DIR/capture-macro-rules-invoke.rs:29:27: 29:28 (#CTXT), | ||
}, | ||
Punct { | ||
ch: ',', | ||
spacing: Alone, | ||
span: $DIR/capture-macro-rules-invoke.rs:29:28: 29:29 (#CTXT), | ||
}, | ||
Ident { | ||
ident: "b", | ||
span: $DIR/capture-macro-rules-invoke.rs:29:30: 29:31 (#CTXT), | ||
}, | ||
], | ||
span: $DIR/capture-macro-rules-invoke.rs:29:26: 29:32 (#CTXT), | ||
}, | ||
], | ||
span: $DIR/capture-macro-rules-invoke.rs:17:21: 17:25 (#CTXT), | ||
}, | ||
] |
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