]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/issue-10536.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / macros / issue-10536.rs
1 // We only want to assert that this doesn't ICE, we don't particularly care
2 // about whether it nor it fails to compile.
3
4 macro_rules! foo{
5     () => {{
6         macro_rules! bar{() => (())}
7         1
8     }}
9 }
10
11 pub fn main() {
12     foo!();
13
14     assert!({one! two()}); //~ ERROR expected one of `(`, `[`, or `{`, found `two`
15
16     // regardless of whether nested macro_rules works, the following should at
17     // least throw a conventional error.
18     assert!({one! two}); //~ ERROR expected one of `(`, `[`, or `{`, found `two`
19 }