rust/tests/ui/macros/edition-macro-pats.rs

13 lines
154 B
Rust
Raw Normal View History

//@ run-pass
//@ edition:2021
macro_rules! foo {
2021-04-15 01:34:51 +00:00
(a $x:pat_param) => {};
2021-04-28 02:15:59 +00:00
(b $x:pat) => {};
}
fn main() {
foo!(a None);
foo!(b 1 | 2);
}