1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Feature gate test for macro_at_most_once_rep under 2018 edition.
13 // gate-test-macro_at_most_once_rep
14 // compile-flags: --edition=2018
18 //~^ERROR using the `?` macro Kleene operator for
19 //~|ERROR expected `*` or `+`
23 ($(a),?) => {} //~ERROR expected `*` or `+`
26 macro_rules! barplus {
28 //~^ERROR using the `?` macro Kleene operator for
29 //~|ERROR expected `*` or `+`
32 macro_rules! barstar {
34 //~^ERROR using the `?` macro Kleene operator for
35 //~|ERROR expected `*` or `+`
41 foo!(a?); //~ ERROR no rules expected the token `?`
42 foo!(a?a); //~ ERROR no rules expected the token `?`
43 foo!(a?a?a); //~ ERROR no rules expected the token `?`