File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2387,7 +2387,7 @@ pub enum ItemKind {
23872387 ) ,
23882388 /// A macro invocation.
23892389 ///
2390- /// E.g., `macro_rules! foo { .. }` or ` foo!(..)`.
2390+ /// E.g., `foo!(..)`.
23912391 Mac ( Mac ) ,
23922392
23932393 /// A macro definition.
Original file line number Diff line number Diff line change @@ -1369,8 +1369,12 @@ impl<'a> State<'a> {
13691369 }
13701370 }
13711371 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+ } ;
13741378 self . print_mac_common (
13751379 Some ( MacHeader :: Keyword ( kw) ) ,
13761380 has_bang,
Original file line number Diff line number Diff line change 22
33#![ feature( decl_macro) ]
44
5- macro mac { ( $ arg : expr) => { $ arg + $ arg } }
5+ pub ( crate ) macro mac { ( $ arg : expr) => { $ arg + $ arg } }
66
77fn main ( ) { }
You can’t perform that action at this time.
0 commit comments