提交 a1c71a17 编写于 作者: J Joshua Nelson

rustdoc,metadata: Debugging

上级 868927fe
......@@ -222,6 +222,7 @@ fn existing_match(&self, name: Symbol, hash: Option<Svh>, kind: PathKind) -> Opt
let mut ret = None;
self.cstore.iter_crate_data(|cnum, data| {
if data.name() != name {
tracing::trace!("{} did not match {}", data.name(), name);
return;
}
......@@ -230,7 +231,10 @@ fn existing_match(&self, name: Symbol, hash: Option<Svh>, kind: PathKind) -> Opt
ret = Some(cnum);
return;
}
Some(..) => return,
Some(hash) => {
debug!("actual hash {} did not match expected {}", hash, data.hash());
return;
}
None => {}
}
......@@ -273,6 +277,11 @@ fn existing_match(&self, name: Symbol, hash: Option<Svh>, kind: PathKind) -> Opt
.1;
if kind.matches(prev_kind) {
ret = Some(cnum);
} else {
debug!(
"failed to load existing crate {}; kind {:?} did not match prev_kind {:?}",
name, kind, prev_kind
);
}
});
ret
......
......@@ -439,6 +439,7 @@ pub fn run_core(
resolver.borrow_mut().access(|resolver| {
sess.time("load_extern_crates", || {
for extern_name in &extern_names {
debug!("loading extern crate {}", extern_name);
resolver
.resolve_str_path_error(
DUMMY_SP,
......
......@@ -161,6 +161,7 @@ fn macro_resolve(&self, path_str: &str, parent_id: Option<DefId>) -> Option<Res>
return Some(res.map_id(|_| panic!("unexpected id")));
}
if let Some(module_id) = parent_id {
debug!("resolving {} as a macro in the module {:?}", path_str, module_id);
if let Ok((_, res)) =
resolver.resolve_str_path_error(DUMMY_SP, path_str, MacroNS, module_id)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册