mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
16 lines
223 B
Rust
16 lines
223 B
Rust
|
//@ run-pass
|
||
|
//@ edition:2018
|
||
|
|
||
|
macro_rules! pat_bar {
|
||
|
($p:pat | $p2:pat) => {{
|
||
|
match Some(1u8) {
|
||
|
$p | $p2 => {}
|
||
|
_ => {}
|
||
|
}
|
||
|
}};
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
pat_bar!(Some(1u8) | None);
|
||
|
}
|