diff options
| author | Alexis (Poliorcetics) Bourget <ab_contribs@poliorcetiq.eu> | 2024-12-26 23:41:58 +0100 |
|---|---|---|
| committer | Alexis (Poliorcetics) Bourget <ab_contribs@poliorcetiq.eu> | 2025-01-30 21:12:50 +0100 |
| commit | a063cf5f1c151873f753905c75d8e67115308f9d (patch) | |
| tree | a41c19cd31d2bd221bd0b97bdf5ea7ff3d5b9458 /src/librustdoc/clean/utils.rs | |
| parent | a6434ef9c0246fa39eecb34e22807da2a68f3904 (diff) | |
| download | rust-a063cf5f1c151873f753905c75d8e67115308f9d.tar.gz rust-a063cf5f1c151873f753905c75d8e67115308f9d.zip | |
fix(rustdoc): always use a channel when linking to doc.rust-lang.org
Diffstat (limited to 'src/librustdoc/clean/utils.rs')
| -rw-r--r-- | src/librustdoc/clean/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs index 77040aeb94d..65722eff1da 100644 --- a/src/librustdoc/clean/utils.rs +++ b/src/librustdoc/clean/utils.rs @@ -590,9 +590,9 @@ pub(crate) fn attrs_have_doc_flag<'a>( /// so that the channel is consistent. /// /// Set by `bootstrap::Builder::doc_rust_lang_org_channel` in order to keep tests passing on beta/stable. -pub(crate) const DOC_RUST_LANG_ORG_CHANNEL: &str = env!("DOC_RUST_LANG_ORG_CHANNEL"); -pub(crate) static DOC_CHANNEL: Lazy<&'static str> = - Lazy::new(|| DOC_RUST_LANG_ORG_CHANNEL.rsplit('/').find(|c| !c.is_empty()).unwrap()); +pub(crate) const DOC_RUST_LANG_ORG_VERSION: &str = env!("DOC_RUST_LANG_ORG_CHANNEL"); +pub(crate) static RUSTDOC_VERSION: Lazy<&'static str> = + Lazy::new(|| DOC_RUST_LANG_ORG_VERSION.rsplit('/').find(|c| !c.is_empty()).unwrap()); /// Render a sequence of macro arms in a format suitable for displaying to the user /// as part of an item declaration. |
