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