2020-11-10 18:00:53 -06:00
|
|
|
// Test that :pat doesn't accept top-level or-patterns in edition 2018.
|
|
|
|
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ edition:2018
|
2020-11-10 18:00:53 -06:00
|
|
|
|
|
|
|
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 `|`
|