don't process external_traits when collecting intra-doc links
This commit is contained in:
parent
1999a22881
commit
e721f5e083
1 changed files with 10 additions and 0 deletions
|
|
@ -213,6 +213,7 @@ impl<'a, 'tcx, 'rcx> LinkCollector<'a, 'tcx, 'rcx> {
|
|||
_ => Err(())
|
||||
}
|
||||
} else {
|
||||
debug!("attempting to resolve item without parent module: {}", path_str);
|
||||
Err(())
|
||||
}
|
||||
}
|
||||
|
|
@ -434,6 +435,15 @@ impl<'a, 'tcx, 'rcx> DocFolder for LinkCollector<'a, 'tcx, 'rcx> {
|
|||
self.fold_item_recur(item)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: if we can resolve intra-doc links from other crates, we can use the stock
|
||||
// `fold_crate`, but until then we should avoid scanning `krate.external_traits` since those
|
||||
// will never resolve properly
|
||||
fn fold_crate(&mut self, mut c: Crate) -> Crate {
|
||||
c.module = c.module.take().and_then(|module| self.fold_item(module));
|
||||
|
||||
c
|
||||
}
|
||||
}
|
||||
|
||||
/// Resolves a string as a macro.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue