@@ -104,7 +104,7 @@ pub fn try_inline(cx: &DocContext, def: Def, name: ast::Name, visited: &mut FxHa
104
104
// separately
105
105
Def :: Macro ( did, MacroKind :: Bang ) => {
106
106
record_extern_fqn ( cx, did, clean:: TypeKind :: Macro ) ;
107
- clean:: MacroItem ( build_macro ( cx, did) )
107
+ clean:: MacroItem ( build_macro ( cx, did, name ) )
108
108
}
109
109
_ => return None ,
110
110
} ;
@@ -463,7 +463,7 @@ fn build_static(cx: &DocContext, did: DefId, mutable: bool) -> clean::Static {
463
463
}
464
464
}
465
465
466
- fn build_macro ( cx : & DocContext , did : DefId ) -> clean:: Macro {
466
+ fn build_macro ( cx : & DocContext , did : DefId , name : ast :: Name ) -> clean:: Macro {
467
467
let imported_from = cx. tcx . original_crate_name ( did. krate ) ;
468
468
let def = match cx. cstore . load_macro_untracked ( did, cx. sess ( ) ) {
469
469
LoadedMacro :: MacroDef ( macro_def) => macro_def,
@@ -479,7 +479,7 @@ fn build_macro(cx: &DocContext, did: DefId) -> clean::Macro {
479
479
} ;
480
480
481
481
let source = format ! ( "macro_rules! {} {{\n {}}}" ,
482
- def . ident . name. clean( cx) ,
482
+ name. clean( cx) ,
483
483
matchers. iter( ) . map( |span| {
484
484
format!( " {} => {{ ... }};\n " , span. to_src( cx) )
485
485
} ) . collect:: <String >( ) ) ;
0 commit comments