Skip to content

Commit 390e475

Browse files
weihangloMark-Simulacrum
authored andcommitted
fix(rustdoc): add missing URL component for error messages
1 parent 2d6e3d9 commit 390e475

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

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

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@ note: the lint level is defined here
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
1212
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
13-
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
13+
= 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
1414

1515
error: unknown disambiguator `bar`
1616
--> $DIR/unknown-disambiguator.rs:4:35
1717
|
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)