Skip to content

Commit

Permalink
Capture tokens for Pat used in macro_rules! argument
Browse files Browse the repository at this point in the history
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
Aaron1011 committed Aug 20, 2020
1 parent 4b0e6d5 commit 191b080
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clippy_lints/src/unnested_or_patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ fn take_pat(from: &mut Pat) -> Pat {
id: DUMMY_NODE_ID,
kind: Wild,
span: DUMMY_SP,
tokens: None
};
mem::replace(from, dummy)
}
Expand Down

0 comments on commit 191b080

Please sign in to comment.