about summary refs log tree commit diff
path: root/src/librustdoc/html/templates
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-04 06:13:57 +0100
committerGitHub <noreply@github.com>2025-02-04 06:13:57 +0100
commitf8f31faeb75b739f8aa1e425c3115f4e8906fd7a (patch)
treea569095d5cc8fde3ef35b08edd1bac3e6ed9a953 /src/librustdoc/html/templates
parentaffdb59607566c1615c829eea9e7b27a093994ec (diff)
parenta063cf5f1c151873f753905c75d8e67115308f9d (diff)
Rollup merge of #134807 - poliorcetics:ab/push-skpynvsmwkll, r=camelid
fix(rustdoc): always use a channel when linking to doc.rust-lang.org

Closes #131971

I manually checked the resulting links

One issue is that this will create `nightly/...` links in places that formerly linked to stable, is that ok ? (the `slice` and `array` links in the search help notably)
Diffstat (limited to 'src/librustdoc/html/templates')
-rw-r--r--src/librustdoc/html/templates/type_layout.html2
-rw-r--r--src/librustdoc/html/templates/type_layout_size.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/templates/type_layout.html b/src/librustdoc/html/templates/type_layout.html
index 9c62826ccc2..0034552bdd3 100644
--- a/src/librustdoc/html/templates/type_layout.html
+++ b/src/librustdoc/html/templates/type_layout.html
@@ -10,7 +10,7 @@
                 unstable</strong> and may even differ between compilations. {#+ #}
             The only exception is types with certain <code>repr(...)</code> {#+ #}
             attributes. Please see the Rust Reference's {#+ #}
-            <a href="https://doc.rust-lang.org/reference/type-layout.html">“Type Layout”</a> {#+ #}
+            <a href="{{ crate::DOC_RUST_LANG_ORG_VERSION }}/reference/type-layout.html">“Type Layout”</a> {#+ #}
             chapter for details on type layout guarantees. {# #}
         </p> {# #}
     </div> {# #}
diff --git a/src/librustdoc/html/templates/type_layout_size.html b/src/librustdoc/html/templates/type_layout_size.html
index 9c2b39edc9f..5256b6c8f2a 100644
--- a/src/librustdoc/html/templates/type_layout_size.html
+++ b/src/librustdoc/html/templates/type_layout_size.html
@@ -7,6 +7,6 @@
     {{ size +}} bytes
   {% endif %}
   {% if is_uninhabited %}
-    {# +#} (<a href="https://doc.rust-lang.org/stable/reference/glossary.html#uninhabited">uninhabited</a>)
+    {# +#} (<a href="{{ crate::DOC_RUST_LANG_ORG_VERSION }}/reference/glossary.html#uninhabited">uninhabited</a>)
   {% endif %}
 {% endif %}