2014-07-02 05:11:47 +00:00
|
|
|
// We only want to assert that this doesn't ICE, we don't particularly care
|
|
|
|
// about whether it nor it fails to compile.
|
|
|
|
|
|
|
|
macro_rules! foo{
|
|
|
|
() => {{
|
|
|
|
macro_rules! bar{() => (())}
|
|
|
|
1
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
foo!();
|
|
|
|
|
2019-11-30 23:25:32 +00:00
|
|
|
assert!({one! two()}); //~ ERROR expected one of `(`, `[`, or `{`, found `two`
|
2014-07-02 05:11:47 +00:00
|
|
|
|
|
|
|
// regardless of whether nested macro_rules works, the following should at
|
|
|
|
// least throw a conventional error.
|
2019-11-30 23:25:32 +00:00
|
|
|
assert!({one! two}); //~ ERROR expected one of `(`, `[`, or `{`, found `two`
|
2014-07-02 05:11:47 +00:00
|
|
|
}
|