rustc: combine partial_def_map and last_private_map into def_map.

This commit is contained in:
Eduard Burtescu
2015-02-17 06:44:23 +02:00
parent 06f362aeb3
commit 5a6a9ed792
38 changed files with 442 additions and 447 deletions

View File

@@ -2388,7 +2388,7 @@ fn resolve_type(cx: &DocContext,
};
debug!("searching for {} in defmap", id);
let def = match tcx.def_map.borrow().get(&id) {
Some(&k) => k,
Some(k) => k.full_def(),
None => panic!("unresolved id not in defmap")
};
@@ -2454,7 +2454,7 @@ fn resolve_use_source(cx: &DocContext, path: Path, id: ast::NodeId) -> ImportSou
fn resolve_def(cx: &DocContext, id: ast::NodeId) -> Option<ast::DefId> {
cx.tcx_opt().and_then(|tcx| {
tcx.def_map.borrow().get(&id).map(|&def| register_def(cx, def))
tcx.def_map.borrow().get(&id).map(|d| register_def(cx, d.full_def()))
})
}