diff options
| author | bors <bors@rust-lang.org> | 2021-06-06 11:31:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-06 11:31:16 +0000 |
| commit | f57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1 (patch) | |
| tree | 9bc36b15565d83984822ad38b4d9604e1e09e8af /src | |
| parent | 3740ba2a7dd965ca45db500ebf7ad580a7812c07 (diff) | |
| parent | 19433c44bde0dd6ed674bd03f1cefbfc2f95c676 (diff) | |
| download | rust-f57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1.tar.gz rust-f57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1.zip | |
Auto merge of #86054 - JohnTitor:rollup-j40z7sm, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #85436 (Avoid cloning cache key) - #85772 (Preserve metadata w/ Solaris-like linkers.) - #85920 (Tweak wasm_base target spec to indicate linker is not GNU and update linker inferring logic for wasm-ld.) - #85930 (Update standard library for IntoIterator implementation of arrays ) - #85972 (Rustdoc html fixes) - #86028 (Drop an `if let` that will always succeed) - #86043 (don't clone attrs) - #86047 (Don't fire `invalid_doc_attributes` on `extern crate` items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/layout.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/const-generics/array-impls/into-iter-impls-length-32.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/rustdoc/doc-inline-extern-crate.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/rustdoc/doc-inline-extern-crate.stderr | 13 |
6 files changed, 46 insertions, 18 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 7309a1da230..d2d1757b900 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -105,7 +105,7 @@ crate fn render<T: Print, S: Print>( placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \ type=\"search\">\ </div>\ - <button type=\"button\" id=\"help-button\" title=\"help\">?</button> + <button type=\"button\" id=\"help-button\" title=\"help\">?</button>\ <a id=\"settings-menu\" href=\"{root_path}settings.html\" title=\"settings\">\ <img src=\"{static_root_path}wheel{suffix}.svg\" \ width=\"18\" height=\"18\" \ @@ -161,7 +161,7 @@ crate fn render<T: Print, S: Print>( } }, title = page.title, - description = page.description, + description = Escape(page.description), keywords = page.keywords, favicon = if layout.favicon.is_empty() { format!( diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 10f5184e39a..4b6faefc2fb 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -322,7 +322,13 @@ impl AllTypes { if !e.is_empty() { let mut e: Vec<&ItemEntry> = e.iter().collect(); e.sort(); - write!(f, "<h3 id=\"{}\">{}</h3><ul class=\"{} docblock\">", title, title, class); + write!( + f, + "<h3 id=\"{}\">{}</h3><ul class=\"{} docblock\">", + title.replace(' ', "-"), // IDs cannot contain whitespaces. + title, + class + ); for s in e.iter() { write!(f, "<li>{}</li>", s.print()); @@ -346,7 +352,7 @@ impl AllTypes { </h1>", ); // Note: print_entries does not escape the title, because we know the current set of titles - // don't require escaping. + // doesn't require escaping. print_entries(f, &self.structs, "Structs", "structs"); print_entries(f, &self.enums, "Enums", "enums"); print_entries(f, &self.unions, "Unions", "unions"); diff --git a/src/test/ui/const-generics/array-impls/into-iter-impls-length-32.rs b/src/test/ui/const-generics/array-impls/into-iter-impls-length-32.rs index 6ba1b2813a1..457e5ae6049 100644 --- a/src/test/ui/const-generics/array-impls/into-iter-impls-length-32.rs +++ b/src/test/ui/const-generics/array-impls/into-iter-impls-length-32.rs @@ -9,31 +9,31 @@ use std::{ }; pub fn yes_iterator() -> impl Iterator<Item = i32> { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_double_ended_iterator() -> impl DoubleEndedIterator { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_exact_size_iterator() -> impl ExactSizeIterator { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_fused_iterator() -> impl FusedIterator { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_trusted_len() -> impl TrustedLen { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_clone() -> impl Clone { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } pub fn yes_debug() -> impl Debug { - IntoIter::new([0i32; 32]) + IntoIterator::into_iter([0i32; 32]) } diff --git a/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs b/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs index deafde2912b..4f343f3f97e 100644 --- a/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs +++ b/src/test/ui/const-generics/array-impls/into-iter-impls-length-33.rs @@ -9,31 +9,31 @@ use std::{ }; pub fn yes_iterator() -> impl Iterator<Item = i32> { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_double_ended_iterator() -> impl DoubleEndedIterator { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_exact_size_iterator() -> impl ExactSizeIterator { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_fused_iterator() -> impl FusedIterator { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_trusted_len() -> impl TrustedLen { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_clone() -> impl Clone { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } pub fn yes_debug() -> impl Debug { - IntoIter::new([0i32; 33]) + IntoIterator::into_iter([0i32; 33]) } diff --git a/src/test/ui/rustdoc/doc-inline-extern-crate.rs b/src/test/ui/rustdoc/doc-inline-extern-crate.rs new file mode 100644 index 00000000000..0eb4c149060 --- /dev/null +++ b/src/test/ui/rustdoc/doc-inline-extern-crate.rs @@ -0,0 +1,9 @@ +#[doc(inline)] +//~^ ERROR conflicting +#[doc(no_inline)] +pub extern crate core; + +// no warning +pub extern crate alloc; + +fn main() {} diff --git a/src/test/ui/rustdoc/doc-inline-extern-crate.stderr b/src/test/ui/rustdoc/doc-inline-extern-crate.stderr new file mode 100644 index 00000000000..41518295b12 --- /dev/null +++ b/src/test/ui/rustdoc/doc-inline-extern-crate.stderr @@ -0,0 +1,13 @@ +error: conflicting doc inlining attributes + --> $DIR/doc-inline-extern-crate.rs:1:7 + | +LL | #[doc(inline)] + | ^^^^^^ this attribute... +LL | +LL | #[doc(no_inline)] + | ^^^^^^^^^ ...conflicts with this attribute + | + = help: remove one of the conflicting attributes + +error: aborting due to previous error + |
