diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 2ed2df799dd1c..b3ff645c17ecd 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1925,7 +1925,7 @@ fn can_elide_trait_object_lifetime_bound<'tcx>(
preds: &'tcx ty::List
In older versions of Rust, dyn compatibility was called \"object safety\", \ so this trait is not object safe.
", - base = crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL + base = crate::clean::utils::DOC_RUST_LANG_ORG_VERSION ), ); } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 984b0877d8de2..1226b2811a248 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -1358,10 +1358,10 @@ function preLoadCss(cssUrl) { function buildHelpMenu() { const book_info = document.createElement("span"); - const channel = getVar("channel"); + const drloChannel = `https://doc.rust-lang.org/${getVar("channel")}`; book_info.className = "top"; book_info.innerHTML = `You can find more information in \ -the rustdoc book.`; +the rustdoc book.`; const shortcuts = [ ["?", "Show this help dialog"], @@ -1381,8 +1381,8 @@ function preLoadCss(cssUrl) { div_shortcuts.innerHTML = "fn:
) to \
restrict the search to a given item kind.",
"Accepted kinds are: fn
, mod
, struct
, \
@@ -1392,10 +1392,10 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
-> vec
or String, enum:Cow -> bool
)",
"You can look for items with an exact name by putting double quotes around \
your request: \"string\"
",
- "Look for functions that accept or return \
- slices and \
- arrays by writing \
- square brackets (e.g., -> [u8]
or [] -> Option
)",
+ `Look for functions that accept or return \
+ slices and \
+ arrays by writing square \
+ brackets (e.g., -> [u8]
or [] -> Option
)`,
"Look for items inside another one by searching for a path: vec::Vec
",
].map(x => "" + x + "
").join(""); const div_infos = document.createElement("div"); diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 5fd5eb1447843..1e095dd010465 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -4408,17 +4408,18 @@ ${item.displayPath}${name}\ } }); } else if (query.error === null) { + const dlroChannel = `https://doc.rust-lang.org/${getVar("channel")}`; output.className = "search-failed" + extraClass; output.innerHTML = "No results :(repr(...)
{#+ #}
attributes. Please see the Rust Reference's {#+ #}
- “Type Layout” {#+ #}
+ “Type Layout” {#+ #}
chapter for details on type layout guarantees. {# #}
{# #}
{# #}
diff --git a/src/librustdoc/html/templates/type_layout_size.html b/src/librustdoc/html/templates/type_layout_size.html
index 9c2b39edc9f37..5256b6c8f2ace 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 %}
- {# +#} (uninhabited)
+ {# +#} (uninhabited)
{% endif %}
{% endif %}
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 96ca96ee6bc15..8fb6ced8faed7 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -83,7 +83,7 @@ use rustc_session::config::{ErrorOutputType, RustcOptGroup, make_crate_type_opti
use rustc_session::{EarlyDiagCtxt, getopts};
use tracing::info;
-use crate::clean::utils::DOC_RUST_LANG_ORG_CHANNEL;
+use crate::clean::utils::DOC_RUST_LANG_ORG_VERSION;
/// A macro to create a FxHashMap.
///
@@ -704,7 +704,7 @@ fn usage(argv0: &str) {
println!("{}", options.usage(&format!("{argv0} [options] ")));
println!(" @path Read newline separated options from `path`\n");
println!(
- "More information available at {DOC_RUST_LANG_ORG_CHANNEL}/rustdoc/what-is-rustdoc.html",
+ "More information available at {DOC_RUST_LANG_ORG_VERSION}/rustdoc/what-is-rustdoc.html",
);
}
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index a777b45b8070b..9fe8b99e8af87 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -2168,7 +2168,7 @@ fn disambiguator_error(
report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |diag, _sp, _link_range| {
let msg = format!(
"see {}/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
- crate::DOC_RUST_LANG_ORG_CHANNEL
+ crate::DOC_RUST_LANG_ORG_VERSION
);
diag.note(msg);
});
diff --git a/tests/rustdoc/type-layout.rs b/tests/rustdoc/type-layout.rs
index 1e462210cba21..0b9092e09c618 100644
--- a/tests/rustdoc/type-layout.rs
+++ b/tests/rustdoc/type-layout.rs
@@ -85,9 +85,9 @@ pub enum WithNiche {
}
//@ hasraw type_layout/enum.Uninhabited.html 'Size: '
-//@ hasraw - '0 bytes (uninhabited)'
+//@ hasraw - '0 bytes (uninhabited)'
pub enum Uninhabited {}
//@ hasraw type_layout/struct.Uninhabited2.html 'Size: '
-//@ hasraw - '8 bytes (uninhabited)'
+//@ hasraw - '8 bytes (uninhabited)'
pub struct Uninhabited2(std::convert::Infallible, u64);