Skip to content

Commit bdceb2e

Browse files
committed
Exempt some html links to std::string::String methods from linkchecker
1 parent 845e0ea commit bdceb2e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/tools/linkchecker/main.rs

+15
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ use html5ever::tokenizer::{
3535
// [(generated_documentation_page, &[broken_links])]
3636
#[rustfmt::skip]
3737
const LINKCHECK_EXCEPTIONS: &[(&str, &[&str])] = &[
38+
// These link to methods on std::string::String (the type alias),
39+
// and linkchecker currently cannot deal with that since type alias doc pages
40+
// seem to be lazily loaded-ish?.
41+
("core/primitive.char.html", &["#method.from_utf8_lossy"]),
42+
("core/str/fn.from_utf8.html", &["#method.from_utf8"]),
43+
("core/str/struct.Utf8Chunks.html", &["#method.from_utf8_lossy"]),
44+
("core/str/struct.Utf8Error.html", &["#method.from_utf8"]),
45+
("alloc/str/fn.from_utf8.html", &["#method.from_utf8"]),
46+
("alloc/str/struct.Utf8Chunks.html", &["#method.from_utf8_lossy"]),
47+
("alloc/str/struct.Utf8Error.html", &["#method.from_utf8"]),
48+
("std/primitive.char.html", &["#method.from_utf8_lossy"]),
49+
("std/str/fn.from_utf8.html", &["#method.from_utf8"]),
50+
("std/str/struct.Utf8Chunks.html", &["#method.from_utf8_lossy"]),
51+
("std/str/struct.Utf8Error.html", &["#method.from_utf8"]),
52+
3853
// These try to link to std::collections, but are defined in alloc
3954
// https://github.com/rust-lang/rust/issues/74481
4055
("std/collections/btree_map/struct.BTreeMap.html", &["#insert-and-complex-keys"]),

0 commit comments

Comments
 (0)