2021-06-14 00:15:45 +00: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 21:04:01 +00:00
|
|
|
// @hasraw - ' todo {'
|
2021-06-14 00:15:45 +00:00
|
|
|
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - '{ () => { ... }; ($('
|
2021-07-03 22:10:06 +00:00
|
|
|
// @has - '//span[@class="macro-nonterminal"]' '$'
|
|
|
|
// @has - '//span[@class="macro-nonterminal"]' 'arg'
|
2022-08-11 21:04:01 +00:00
|
|
|
// @hasraw - ':tt)+'
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - ') => { ... }; }'
|
2021-06-14 00:15:45 +00:00
|
|
|
pub use std::todo;
|
|
|
|
|
|
|
|
mod mod1 {
|
|
|
|
// @has 'foo/macro.macro1.html'
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'macro_rules!'
|
|
|
|
// @hasraw - 'macro1'
|
|
|
|
// @hasraw - '{ () => { ... }; ($('
|
2021-07-03 22:10:06 +00:00
|
|
|
// @has - '//span[@class="macro-nonterminal"]' '$'
|
|
|
|
// @has - '//span[@class="macro-nonterminal"]' 'arg'
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - ':'
|
|
|
|
// @hasraw - 'expr'
|
|
|
|
// @hasraw - '),'
|
|
|
|
// @hasraw - '+'
|
|
|
|
// @hasraw - ') => { ... }; }'
|
2021-06-14 00:15:45 +00:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! macro1 {
|
|
|
|
() => {};
|
|
|
|
($($arg:expr),+) => { stringify!($($arg),+) };
|
|
|
|
}
|
|
|
|
}
|