File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
- macro_rules! outer {
2
- ( $( $matcher: tt) * ) => {
1
+ macro_rules! make_macro {
2
+ ( $macro_name : ident $ ( $matcher: tt) * ) => {
3
3
#[ macro_export]
4
- macro_rules! inner {
4
+ macro_rules! $macro_name {
5
5
( <= $( $matcher) * =>) => { } ;
6
6
}
7
7
}
8
8
}
9
9
10
- // @has macro_generated_macro/macro.inner .html //pre 'macro_rules! inner {'
10
+ // @has macro_generated_macro/macro.interpolations .html //pre 'macro_rules! interpolations {'
11
11
// @has - //pre '(<= type $($i : ident) :: * + $e : expr =>) => { ... };'
12
- outer ! ( type $( $i: ident) :: * + $e: expr) ;
12
+ make_macro ! ( interpolations type $( $i: ident) :: * + $e: expr) ;
13
+ interpolations ! ( <= type foo:: bar + x. sort( ) =>) ;
13
14
14
- inner ! ( <= type foo:: bar + x. sort( ) =>) ;
15
+ // @has macro_generated_macro/macro.attributes.html //pre 'macro_rules! attributes {'
16
+ // @has - //pre '(<= #! [no_std] #[inline] =>) => { ... };'
17
+ make_macro ! ( attributes #![ no_std] #[ inline] ) ;
18
+
19
+ // @has macro_generated_macro/macro.groups.html //pre 'macro_rules! groups {'
20
+ // @has - //pre '(<= fn {} () { foo [0] } =>) => { ... };'
21
+ make_macro ! ( groups fn { } ( ) { foo[ 0 ] } ) ;
You can’t perform that action at this time.
0 commit comments