Skip to content

Commit

Permalink
Add hard-to-fix broken links to linkchecker exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Sep 10, 2020
1 parent 29efeb7 commit 3a9c5ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ const LINKCHECK_EXCEPTIONS: &[(&str, &[&str])] = &[
"#method.get_unchecked_mut",
],
),
// FIXME(#74672): "Read more" is broken
("std/primitive.usize.html", &["#tymethod.from_u64"]),
("std/primitive.u32.html", &["#tymethod.from_u64"]),
("std/primitive.u64.html", &["#tymethod.from_u64"]),
// These try to link to std::collections, but are defined in alloc
// https://github.com/rust-lang/rust/issues/74481
("std/collections/btree_map/struct.BTreeMap.html", &["#insert-and-complex-keys"]),
Expand Down Expand Up @@ -142,6 +146,12 @@ fn is_exception(file: &Path, link: &str) -> bool {
if let Some(entry) = LINKCHECK_EXCEPTIONS.iter().find(|&(f, _)| file.ends_with(f)) {
entry.1.contains(&link)
} else {
// FIXME(#63351): Concat trait in alloc/slice reexported in primitive page
if file.ends_with("std/primitive.slice.html") {
if link.ends_with("std/primitive.slice.html") {
return true;
}
}
false
}
}
Expand Down

0 comments on commit 3a9c5ae

Please sign in to comment.