2021-06-13 19:15:45 -05:00
|
|
|
// This is a regression test for issue #86208.
|
|
|
|
// It is also a general test of macro_rules! display.
|
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
// @has 'foo/macro.todo.html'
|
|
|
|
// @has - '//span[@class="macro"]' 'macro_rules!'
|
2022-08-11 16:04:01 -05:00
|
|
|
// @hasraw - ' todo {'
|
2021-06-13 19:15:45 -05:00
|
|
|
|
2022-08-10 15:13:18 -05:00
|
|
|
// @hasraw - '{ () => { ... }; ($('
|
2021-07-03 17:10:06 -05:00
|
|
|
// @has - '//span[@class="macro-nonterminal"]' '$'
|
|
|
|
// @has - '//span[@class="macro-nonterminal"]' 'arg'
|
2022-08-11 16:04:01 -05:00
|
|
|
// @hasraw - ':tt)+'
|
2022-08-10 15:13:18 -05:00
|
|
|
// @hasraw - ') => { ... }; }'
|
2021-06-13 19:15:45 -05:00
|
|
|
pub use std::todo;
|
|
|
|
|
|
|
|
mod mod1 {
|
|
|
|
// @has 'foo/macro.macro1.html'
|
2022-08-10 15:13:18 -05:00
|
|
|
// @hasraw - 'macro_rules!'
|
|
|
|
// @hasraw - 'macro1'
|
|
|
|
// @hasraw - '{ () => { ... }; ($('
|
2021-07-03 17:10:06 -05:00
|
|
|
// @has - '//span[@class="macro-nonterminal"]' '$'
|
|
|
|
// @has - '//span[@class="macro-nonterminal"]' 'arg'
|
2022-08-10 15:13:18 -05:00
|
|
|
// @hasraw - ':'
|
|
|
|
// @hasraw - 'expr'
|
|
|
|
// @hasraw - '),'
|
|
|
|
// @hasraw - '+'
|
|
|
|
// @hasraw - ') => { ... }; }'
|
2021-06-13 19:15:45 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! macro1 {
|
|
|
|
() => {};
|
|
|
|
($($arg:expr),+) => { stringify!($($arg),+) };
|
|
|
|
}
|
|
|
|
}
|