2017-05-12 02:53:58 -05:00
|
|
|
#![allow(unused_macros)]
|
|
|
|
|
2015-01-02 15:41:24 -06:00
|
|
|
macro_rules! errors_everywhere {
|
2015-01-05 00:51:03 -06:00
|
|
|
($ty:ty <) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty`
|
|
|
|
($ty:ty < foo ,) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty`
|
|
|
|
($ty:ty , ) => ();
|
|
|
|
( ( $ty:ty ) ) => ();
|
|
|
|
( { $ty:ty } ) => ();
|
|
|
|
( [ $ty:ty ] ) => ();
|
|
|
|
($bl:block < ) => ();
|
|
|
|
($pa:pat >) => (); //~ ERROR `$pa:pat` is followed by `>`, which is not allowed for `pat`
|
|
|
|
($pa:pat , ) => ();
|
|
|
|
($pa:pat $pb:pat $ty:ty ,) => ();
|
2015-01-06 17:02:00 -06:00
|
|
|
//~^ ERROR `$pa:pat` is followed by `$pb:pat`, which is not allowed
|
|
|
|
//~^^ ERROR `$pb:pat` is followed by `$ty:ty`, which is not allowed
|
|
|
|
($($ty:ty)* -) => (); //~ ERROR `$ty:ty` is followed by `-`
|
|
|
|
($($a:ty, $b:ty)* -) => (); //~ ERROR `$b:ty` is followed by `-`
|
2015-01-05 00:51:03 -06:00
|
|
|
($($ty:ty)-+) => (); //~ ERROR `$ty:ty` is followed by `-`, which is not allowed for `ty`
|
2015-11-24 12:46:21 -06:00
|
|
|
( $($a:expr)* $($b:tt)* ) => { };
|
|
|
|
//~^ ERROR `$a:expr` is followed by `$b:tt`, which is not allowed for `expr` fragments
|
2015-01-02 15:41:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|