File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2387,7 +2387,7 @@ pub enum ItemKind {
2387
2387
) ,
2388
2388
/// A macro invocation.
2389
2389
///
2390
- /// E.g., `macro_rules! foo { .. }` or ` foo!(..)`.
2390
+ /// E.g., `foo!(..)`.
2391
2391
Mac ( Mac ) ,
2392
2392
2393
2393
/// A macro definition.
Original file line number Diff line number Diff line change @@ -1369,8 +1369,12 @@ impl<'a> State<'a> {
1369
1369
}
1370
1370
}
1371
1371
ast:: ItemKind :: MacroDef ( ref macro_def) => {
1372
- let ( kw, has_bang) =
1373
- if macro_def. legacy { ( "macro_rules" , true ) } else { ( "macro" , false ) } ;
1372
+ let ( kw, has_bang) = if macro_def. legacy {
1373
+ ( "macro_rules" , true )
1374
+ } else {
1375
+ self . print_visibility ( & item. vis ) ;
1376
+ ( "macro" , false )
1377
+ } ;
1374
1378
self . print_mac_common (
1375
1379
Some ( MacHeader :: Keyword ( kw) ) ,
1376
1380
has_bang,
Original file line number Diff line number Diff line change 2
2
3
3
#![ feature( decl_macro) ]
4
4
5
- macro mac { ( $ arg : expr) => { $ arg + $ arg } }
5
+ pub ( crate ) macro mac { ( $ arg : expr) => { $ arg + $ arg } }
6
6
7
7
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments