blob: 9c3c5dd360e07912754c13c0cac043f7e59b5069 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Test that :pat doesn't accept top-level or-patterns in edition 2018.
// edition:2018
#![feature(or_patterns)]
fn main() {}
// Test the `pat` macro fragment parser:
macro_rules! accept_pat {
($p:pat) => {};
}
accept_pat!(p | q); //~ ERROR no rules expected the token `|`
accept_pat!(|p| q); //~ ERROR no rules expected the token `|`
|