Skip to content

Commit

Permalink
Add a test of rustdoc on macro-generated macro
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 28, 2021
1 parent 544a6bb commit 0f8415b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/rustdoc/macro-generated-macro.rs
@@ -0,0 +1,14 @@
macro_rules! outer {
($($matcher:tt)*) => {
#[macro_export]
macro_rules! inner {
(<= $($matcher)* =>) => {};
}
}
}

// @has macro_generated_macro/macro.inner.html //pre 'macro_rules! inner {'
// @has - //pre '(<= type $($i : ident) :: * + $e : expr =>) => { ... };'
outer!(type $($i:ident)::* + $e:expr);

inner!(<= type foo::bar + x.sort() =>);

0 comments on commit 0f8415b

Please sign in to comment.