]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/visit_ast.rs
Auto merge of #102233 - petrochenkov:effvis, r=jackh726
[rust.git] / src / librustdoc / visit_ast.rs
index b8522ea5d8fdc6ad2f762c48502177f76cd631c3..8023ec9fa9a2d2367092b0b8bba2017269799226 100644 (file)
@@ -7,7 +7,7 @@
 use rustc_hir::def_id::DefId;
 use rustc_hir::Node;
 use rustc_hir::CRATE_HIR_ID;
-use rustc_middle::middle::privacy::AccessLevel;
+use rustc_middle::middle::privacy::Level;
 use rustc_middle::ty::{TyCtxt, Visibility};
 use rustc_span::def_id::{CRATE_DEF_ID, LOCAL_CRATE};
 use rustc_span::symbol::{kw, sym, Symbol};
@@ -230,10 +230,10 @@ fn maybe_inline_local(
                     } 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(
+                        self.cx.cache.effective_visibilities.set_public_at_level(
                             did,
                             || Visibility::Restricted(CRATE_DEF_ID),
-                            AccessLevel::Public,
+                            Level::Direct,
                         );
                     }
                 }
@@ -246,7 +246,7 @@ fn maybe_inline_local(
             None => return false,
         };
 
-        let is_private = !self.cx.cache.access_levels.is_public(res_did);
+        let is_private = !self.cx.cache.effective_visibilities.is_directly_public(res_did);
         let is_hidden = inherits_doc_hidden(self.cx.tcx, res_hir_id);
 
         // Only inline if requested or if the item would otherwise be stripped.