X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustdoc%2Fcore.rs;h=5872c8da1a47e198a64230c3594b9d9d70b1fa61;hb=02b0479c26b389f08e51da4fc5b6e99488fdb96f;hp=a31357349a4b68e4a10e1f8b9b11113a75d941c8;hpb=bab5eb41a7f3f755708527d97a1f8bf09b15d570;p=rust.git diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index a31357349a4..5872c8da1a4 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -25,7 +25,7 @@ use rustc_metadata::cstore::CStore; use rustc_target::spec::TargetTriple; -use syntax::ast::NodeId; +use syntax::ast::{Name, NodeId}; use syntax::codemap; use syntax::edition::Edition; use syntax::feature_gate::UnstableFeatures; @@ -82,7 +82,8 @@ pub struct DocContext<'a, 'tcx: 'a, 'rcx: 'a> { pub fake_def_ids: RefCell>, pub all_fake_def_ids: RefCell>, /// Maps (type_id, trait_id) -> auto trait impl - pub generated_synthetics: RefCell> + pub generated_synthetics: RefCell>, + pub current_item_name: RefCell>, } impl<'a, 'tcx, 'rcx> DocContext<'a, 'tcx, 'rcx> { @@ -384,6 +385,7 @@ pub fn run_core(search_paths: SearchPaths, fake_def_ids: RefCell::new(FxHashMap()), all_fake_def_ids: RefCell::new(FxHashSet()), generated_synthetics: RefCell::new(FxHashSet()), + current_item_name: RefCell::new(None), }; debug!("crate: {:?}", tcx.hir.krate());