rust/tests/ui/macros/macro-pat-follow-2018.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
221 B
Rust
Raw Normal View History

// run-pass
// edition:2018
macro_rules! pat_bar {
($p:pat | $p2:pat) => {{
match Some(1u8) {
$p | $p2 => {}
_ => {}
}
}};
}
fn main() {
pat_bar!(Some(1u8) | None);
}