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

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

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);
}