]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/core.rs
Auto merge of #52568 - oli-obk:span_bug_error, r=varkor
[rust.git] / src / librustdoc / core.rs
index a31357349a4b68e4a10e1f8b9b11113a75d941c8..5872c8da1a47e198a64230c3594b9d9d70b1fa61 100644 (file)
@@ -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<FxHashMap<CrateNum, DefId>>,
     pub all_fake_def_ids: RefCell<FxHashSet<DefId>>,
     /// Maps (type_id, trait_id) -> auto trait impl
-    pub generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>>
+    pub generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>>,
+    pub current_item_name: RefCell<Option<Name>>,
 }
 
 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());