2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-08-05 10:37:48 -05:00
|
|
|
|
2022-04-17 17:00:10 +02:00
|
|
|
#[allow(unused_macro_rules)]
|
2018-08-05 10:37:48 -05:00
|
|
|
macro_rules! a {
|
|
|
|
($i:literal) => { "right" };
|
|
|
|
($i:tt) => { "wrong" };
|
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! b {
|
|
|
|
($i:literal) => { a!($i) };
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(b!(0), "right");
|
|
|
|
}
|