Skip to content

Commit 191b080

Browse files
committed
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.
1 parent 4b0e6d5 commit 191b080

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_lints/src/unnested_or_patterns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ fn take_pat(from: &mut Pat) -> Pat {
340340
id: DUMMY_NODE_ID,
341341
kind: Wild,
342342
span: DUMMY_SP,
343+
tokens: None
343344
};
344345
mem::replace(from, dummy)
345346
}

0 commit comments

Comments
 (0)