2015-01-02 16:00:06 -06:00
|
|
|
#![feature(macro_rules)]
|
2013-10-02 22:00:54 -05:00
|
|
|
|
2015-01-02 16:00:06 -06:00
|
|
|
macro_rules! g {
|
2013-05-22 15:07:02 -05:00
|
|
|
($inp:ident) => (
|
2015-01-02 16:00:06 -06:00
|
|
|
{ $inp $nonexistent }
|
2018-07-15 16:11:54 -05:00
|
|
|
//~^ ERROR unknown macro variable `nonexistent`
|
2013-05-22 15:07:02 -05:00
|
|
|
);
|
2015-01-02 16:44:21 -06:00
|
|
|
}
|
2013-05-22 15:07:02 -05:00
|
|
|
|
|
|
|
fn main() {
|
2018-12-16 11:23:27 -06:00
|
|
|
let foo = 0;
|
2015-01-02 16:00:06 -06:00
|
|
|
g!(foo);
|
2013-05-22 15:07:02 -05:00
|
|
|
}
|