- let attrs = clean::inline::load_attrs(self.cx, res_did);
- let self_is_hidden = attrs.lists(sym::doc).has_word(sym::hidden);
- if !self_is_hidden {
- if let Res::Def(kind, did) = res {
- if kind == DefKind::Mod {
- crate::visit_lib::LibEmbargoVisitor::new(self.cx).visit_mod(did)
- } else {
- // All items need to be handled here in case someone wishes to link
- // to them with intra-doc links
- self.cx.cache.access_levels.set_access_level(
- did,
- || Visibility::Restricted(CRATE_DEF_ID),
- AccessLevel::Public,
- );
- }
- }
- }