1 // This is a regression test for issue #86208. 2 // It is also a general test of macro_rules! display. 3 4 #![crate_name = "foo"] 5 6 // @has 'foo/macro.todo.html' 7 // @has - '//span[@class="macro"]' 'macro_rules!' 8 // @hasraw - ' todo {' 9 10 // @hasraw - '{ () => { ... }; ($(' 11 // @has - '//span[@class="macro-nonterminal"]' '$' 12 // @has - '//span[@class="macro-nonterminal"]' 'arg' 13 // @hasraw - ':tt)+' 14 // @hasraw - ') => { ... }; }' 15 pub use std::todo; 16 17 mod mod1 { 18 // @has 'foo/macro.macro1.html' 19 // @hasraw - 'macro_rules!' 20 // @hasraw - 'macro1' 21 // @hasraw - '{ () => { ... }; ($(' 22 // @has - '//span[@class="macro-nonterminal"]' '$' 23 // @has - '//span[@class="macro-nonterminal"]' 'arg' 24 // @hasraw - ':' 25 // @hasraw - 'expr' 26 // @hasraw - '),' 27 // @hasraw - '+' 28 // @hasraw - ') => { ... }; }' 29 #[macro_export] 30 macro_rules! macro1 { 31 () => {}; 32 ($($arg:expr),+) => { stringify!($($arg),+) }; 33 } 34 } 35