Skip to content

Commit 8564ee8

Browse files
authored
Rollup merge of #103588 - weihanglo:rustdoc/url-redirect, r=notriddle
rustdoc: add missing URL redirect #94753 missed some redirect settings, and one of the missing URL shows up in an error message. This PR adds those redirects.
2 parents 3143472 + 06692ea commit 8564ee8

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Diff for: src/doc/rustdoc/book.toml

+4
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ title = "The rustdoc book"
66
git-repository-url = "https://github.com/rust-lang/rust/tree/master/src/doc/rustdoc"
77

88
[output.html.redirect]
9+
"/what-to-include.html" = "write-documentation/what-to-include.html"
910
"/the-doc-attribute.html" = "write-documentation/the-doc-attribute.html"
11+
"/linking-to-items-by-name.html" = "write-documentation/linking-to-items-by-name.html"
1012
"/documentation-tests.html" = "write-documentation/documentation-tests.html"
13+
"/website-features.html" = "advanced-features.html#custom-search-engines"
14+
"/passes.html" = "deprecated-features.html#passes"

Diff for: src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ fn disambiguator_error(
18931893
diag_info.link_range = disambiguator_range;
18941894
report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |diag, _sp| {
18951895
let msg = format!(
1896-
"see {}/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
1896+
"see {}/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
18971897
crate::DOC_RUST_LANG_ORG_CHANNEL
18981898
);
18991899
diag.note(&msg);

Diff for: src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unknown disambiguator `foo`
44
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
55
| ^^^
66
|
7-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
7+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
88
note: the lint level is defined here
99
--> $DIR/unknown-disambiguator.rs:2:9
1010
|
@@ -18,39 +18,39 @@ error: unknown disambiguator `bar`
1818
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
1919
| ^^^
2020
|
21-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
21+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
2222

2323
error: unknown disambiguator `foo`
2424
--> $DIR/unknown-disambiguator.rs:10:34
2525
|
2626
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
2727
| ^^^
2828
|
29-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
29+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
3030

3131
error: unknown disambiguator `foo`
3232
--> $DIR/unknown-disambiguator.rs:10:48
3333
|
3434
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
3535
| ^^^
3636
|
37-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
37+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
3838

3939
error: unknown disambiguator ``
4040
--> $DIR/unknown-disambiguator.rs:7:31
4141
|
4242
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
4343
| ^
4444
|
45-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
45+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
4646

4747
error: unknown disambiguator ``
4848
--> $DIR/unknown-disambiguator.rs:7:57
4949
|
5050
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
5151
| ^
5252
|
53-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
53+
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
5454

5555
error: aborting due to 6 previous errors
5656

0 commit comments

Comments
 (0)