2015-11-14 19:50:46 +09:00
|
|
|
macro_rules! foo {
|
2017-01-29 08:38:44 +00:00
|
|
|
($a:expr) => a; //~ ERROR macro rhs must be delimited
|
2015-11-14 19:50:46 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2016-05-21 01:58:42 +00: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 19:50:46 +09:00
|
|
|
}
|