diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index fa29b54264948..0c81a55843013 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -9,7 +9,7 @@ use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::DefId; use rustc_hir::Mutability; -use rustc_metadata::creader::LoadedMacro; +use rustc_metadata::creader::{CStore, LoadedMacro}; use rustc_middle::ty::{self, TyCtxt}; use rustc_span::hygiene::MacroKind; use rustc_span::symbol::{kw, sym, Symbol}; @@ -179,7 +179,7 @@ crate fn record_extern_fqn(cx: &mut DocContext<'_>, did: DefId, kind: ItemType) let fqn = if let ItemType::Macro = kind { // Check to see if it is a macro 2.0 or built-in macro if matches!( - cx.enter_resolver(|r| r.cstore().load_macro_untracked(did, cx.sess())), + CStore::from_tcx(cx.tcx).load_macro_untracked(did, cx.sess()), LoadedMacro::MacroDef(def, _) if matches!(&def.kind, ast::ItemKind::MacroDef(ast_def) if !ast_def.macro_rules) @@ -558,7 +558,7 @@ fn build_macro( import_def_id: Option, ) -> clean::ItemKind { let imported_from = cx.tcx.crate_name(def_id.krate); - match cx.enter_resolver(|r| r.cstore().load_macro_untracked(def_id, cx.sess())) { + match CStore::from_tcx(cx.tcx).load_macro_untracked(def_id, cx.sess()) { LoadedMacro::MacroDef(item_def, _) => { if let ast::ItemKind::MacroDef(ref def) = item_def.kind { clean::MacroItem(clean::Macro {