Skip to content

Commit

Permalink
Avoid some common false positives in intra doc link checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Mar 9, 2019
1 parent b2ea6c8 commit a4ea084
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Expand Up @@ -291,6 +291,12 @@ impl<'a, 'tcx, 'rcx> DocFolder for LinkCollector<'a, 'tcx, 'rcx> {
if ori_link.contains('/') {
continue;
}

// [] is mostly likely not supposed to be a link
if ori_link.is_empty() {
continue;
}

let link = ori_link.replace("`", "");
let (def, fragment) = {
let mut kind = PathKind::Unknown;
Expand Down

0 comments on commit a4ea084

Please sign in to comment.