diff options
Diffstat (limited to 'tests/ui/macros/macro-pat-follow-2018.rs')
-rw-r--r-- | tests/ui/macros/macro-pat-follow-2018.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-pat-follow-2018.rs b/tests/ui/macros/macro-pat-follow-2018.rs new file mode 100644 index 000000000..ce2911de9 --- /dev/null +++ b/tests/ui/macros/macro-pat-follow-2018.rs @@ -0,0 +1,15 @@ +// run-pass +// edition:2018 + +macro_rules! pat_bar { + ($p:pat | $p2:pat) => {{ + match Some(1u8) { + $p | $p2 => {} + _ => {} + } + }}; +} + +fn main() { + pat_bar!(Some(1u8) | None); +} |