rustdoc,metadata: Debugging

This commit is contained in:
Joshua Nelson 2020-08-08 23:47:07 -04:00
parent 868927fefb
commit a1c71a1709
3 changed files with 12 additions and 1 deletions

View file

@ -222,6 +222,7 @@ impl<'a> CrateLoader<'a> {
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 @@ impl<'a> CrateLoader<'a> {
ret = Some(cnum);
return;
}
Some(..) => return,
Some(hash) => {
debug!("actual hash {} did not match expected {}", hash, data.hash());
return;
}
None => {}
}
@ -273,6 +277,11 @@ impl<'a> CrateLoader<'a> {
.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

View file

@ -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,

View file

@ -161,6 +161,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
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)
{