pub external_paths: ExternalPaths,
pub external_traits: RefCell<Option<HashMap<ast::DefId, clean::Trait>>>,
pub external_typarams: RefCell<Option<HashMap<ast::DefId, String>>>,
+ pub inlined: RefCell<Option<HashSet<ast::DefId>>>,
}
impl DocContext {
pub external_paths: ExternalPaths,
pub external_traits: RefCell<Option<HashMap<ast::DefId, clean::Trait>>>,
pub external_typarams: RefCell<Option<HashMap<ast::DefId, String>>>,
+ pub inlined: RefCell<Option<HashSet<ast::DefId>>>,
}
/// Parses, resolves, and typechecks the given crate
external_traits: RefCell::new(Some(HashMap::new())),
external_typarams: RefCell::new(Some(HashMap::new())),
external_paths: RefCell::new(Some(HashMap::new())),
+ inlined: RefCell::new(Some(HashSet::new())),
}, CrateAnalysis {
exported_items: exported_items,
public_items: public_items,
external_paths: RefCell::new(None),
external_traits: RefCell::new(None),
external_typarams: RefCell::new(None),
+ inlined: RefCell::new(None),
})
}
*analysis.external_traits.borrow_mut() = map;
let map = ctxt.external_typarams.borrow_mut().take();
*analysis.external_typarams.borrow_mut() = map;
+ let map = ctxt.inlined.borrow_mut().take();
+ *analysis.inlined.borrow_mut() = map;
(krate, analysis)
}
/// Cache of where external crate documentation can be found.
pub extern_locations: HashMap<ast::CrateNum, ExternalLocation>,
+ /// Set of definitions which have been inlined from external crates.
+ pub inlined: HashSet<ast::DefId>,
+
// Private fields only used when initially crawling a crate to build a cache
stack: Vec<String>,
typarams: analysis.as_ref().map(|a| {
a.external_typarams.borrow_mut().take_unwrap()
}).unwrap_or(HashMap::new()),
+ inlined: analysis.as_ref().map(|a| {
+ a.inlined.borrow_mut().take_unwrap()
+ }).unwrap_or(HashSet::new()),
};
cache.stack.push(krate.name.clone());
krate = cache.fold_crate(krate);
external_paths: RefCell::new(Some(HashMap::new())),
external_traits: RefCell::new(None),
external_typarams: RefCell::new(None),
+ inlined: RefCell::new(None),
};
super::ctxtkey.replace(Some(ctx));