2015-11-14 04:50:46 -06:00
|
|
|
macro_rules! foo {
|
2017-01-29 02:38:44 -06:00
|
|
|
($a:expr) => a; //~ ERROR macro rhs must be delimited
|
2015-11-14 04:50:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2016-05-20 20:58:42 -05:00
|
|
|
foo!(0); // Check that we report errors at macro definition, not expansion.
|
|
|
|
|
|
|
|
let _: cfg!(foo) = (); //~ ERROR non-type macro in type position
|
2015-11-14 04:50:46 -06:00
|
|
|
}
|