msg: &str,
) {
diag_info.link_range = disambiguator_range;
- report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |_diag, _sp| {});
+ report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |diag, _sp| {
+ let channel = match env!("CFG_RELEASE_CHANNEL") {
+ "stable" => env!("CFG_RELEASE_NUM"),
+ "beta" => "beta",
+ "nightly" | "dev" => "nightly",
+ // custom build of rustdoc maybe? link to the stable docs just in case
+ _ => "",
+ };
+ let msg = format!(
+ "see https://doc.rust-lang.org/{}/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
+ channel,
+ );
+ diag.note(&msg);
+ });
}
/// Report an ambiguity error, where there were multiple possible resolutions.
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `bar`
--> $DIR/unknown-disambiguator.rs:3:35
|
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
| ^^^
+ |
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:9:34
|
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
+ |
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:9:48
|
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
+ |
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:6:31
|
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
+ |
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:6:57
|
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
+ |
+ = note: see https://doc.rust-lang.org/nightly/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: aborting due to 6 previous errors