Skip to content

Commit b8728e7

Browse files
committed
rustdoc: Stop using resolver for macro loading
1 parent 59ce765 commit b8728e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/inline.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_hir as hir;
99
use rustc_hir::def::{DefKind, Res};
1010
use rustc_hir::def_id::DefId;
1111
use rustc_hir::Mutability;
12-
use rustc_metadata::creader::LoadedMacro;
12+
use rustc_metadata::creader::{CStore, LoadedMacro};
1313
use rustc_middle::ty::{self, TyCtxt};
1414
use rustc_span::hygiene::MacroKind;
1515
use rustc_span::symbol::{kw, sym, Symbol};
@@ -179,7 +179,7 @@ crate fn record_extern_fqn(cx: &mut DocContext<'_>, did: DefId, kind: ItemType)
179179
let fqn = if let ItemType::Macro = kind {
180180
// Check to see if it is a macro 2.0 or built-in macro
181181
if matches!(
182-
cx.enter_resolver(|r| r.cstore().load_macro_untracked(did, cx.sess())),
182+
CStore::from_tcx(cx.tcx).load_macro_untracked(did, cx.sess()),
183183
LoadedMacro::MacroDef(def, _)
184184
if matches!(&def.kind, ast::ItemKind::MacroDef(ast_def)
185185
if !ast_def.macro_rules)
@@ -558,7 +558,7 @@ fn build_macro(
558558
import_def_id: Option<DefId>,
559559
) -> clean::ItemKind {
560560
let imported_from = cx.tcx.crate_name(def_id.krate);
561-
match cx.enter_resolver(|r| r.cstore().load_macro_untracked(def_id, cx.sess())) {
561+
match CStore::from_tcx(cx.tcx).load_macro_untracked(def_id, cx.sess()) {
562562
LoadedMacro::MacroDef(item_def, _) => {
563563
if let ast::ItemKind::MacroDef(ref def) = item_def.kind {
564564
clean::MacroItem(clean::Macro {

0 commit comments

Comments
 (0)