1
Fork 0

rustdoc: hide macro export statements from docs

This commit is contained in:
QuietMisdreavus 2018-05-23 16:22:18 -05:00
parent 90463a6bdc
commit e3d9f19219
2 changed files with 7 additions and 0 deletions

View file

@ -97,6 +97,9 @@ pub fn try_inline(cx: &DocContext, def: Def, name: ast::Name, visited: &mut FxHa
record_extern_fqn(cx, did, clean::TypeKind::Const);
clean::ConstantItem(build_const(cx, did))
}
// Macros are eagerly inlined back in visit_ast, don't show their export statements
// FIXME(50647): the eager inline does not take doc(hidden)/doc(no_inline) into account
Def::Macro(..) => return Some(Vec::new()),
_ => return None,
};
cx.renderinfo.borrow_mut().inlined.insert(did);