From ac9707d25cb05b43a4466dbf18ca56f1b463ea78 Mon Sep 17 00:00:00 2001 From: apekros Date: Wed, 27 Sep 2023 18:05:14 +1000 Subject: [PATCH 1/5] Add regression test for rust-lang#56098 --- tests/ui/foreign/foreign-fn-linkname.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ui/foreign/foreign-fn-linkname.rs b/tests/ui/foreign/foreign-fn-linkname.rs index f6d820594f9..d1d6e703e3d 100644 --- a/tests/ui/foreign/foreign-fn-linkname.rs +++ b/tests/ui/foreign/foreign-fn-linkname.rs @@ -2,6 +2,9 @@ // ignore-wasm32-bare no libc to test ffi with // ignore-sgx no libc +// Ensure no false positive on "unused extern crate" lint +#![deny(unused_extern_crates)] + #![feature(rustc_private)] extern crate libc; From 79195d5cbbf839ed6db8cda394b0a7b2ef447ba7 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 27 Sep 2023 16:51:21 -0700 Subject: [PATCH 2/5] Add `crate_name` to test so that it can be renamed --- tests/rustdoc/issue-12834.rs | 1 + tests/rustdoc/issue-13698.rs | 2 ++ tests/rustdoc/issue-15169.rs | 3 +++ tests/rustdoc/issue-15318-2.rs | 2 ++ tests/rustdoc/issue-15318-3.rs | 1 + tests/rustdoc/issue-15318.rs | 1 + tests/rustdoc/issue-15347.rs | 2 ++ tests/rustdoc/issue-16265-1.rs | 2 ++ tests/rustdoc/issue-16265-2.rs | 2 ++ tests/rustdoc/issue-17476.rs | 2 ++ tests/rustdoc/issue-19190-2.rs | 2 ++ tests/rustdoc/issue-19190-3.rs | 2 ++ tests/rustdoc/issue-19190.rs | 2 ++ tests/rustdoc/issue-20175.rs | 2 ++ tests/rustdoc/issue-20646.rs | 1 + tests/rustdoc/issue-20727-2.rs | 2 ++ tests/rustdoc/issue-20727-3.rs | 2 ++ tests/rustdoc/issue-20727-4.rs | 2 ++ tests/rustdoc/issue-20727.rs | 2 ++ 19 files changed, 35 insertions(+) diff --git a/tests/rustdoc/issue-12834.rs b/tests/rustdoc/issue-12834.rs index 9605a1e78c1..7bc5f682c5a 100644 --- a/tests/rustdoc/issue-12834.rs +++ b/tests/rustdoc/issue-12834.rs @@ -1,6 +1,7 @@ // Tests that failing to syntax highlight a rust code-block doesn't cause // rustdoc to fail, while still rendering the code-block (without highlighting). +#![crate_name="issue_12834"] #![allow(rustdoc::invalid_rust_codeblocks)] // @has issue_12834/fn.foo.html diff --git a/tests/rustdoc/issue-13698.rs b/tests/rustdoc/issue-13698.rs index 3046a8a2862..ead005301a9 100644 --- a/tests/rustdoc/issue-13698.rs +++ b/tests/rustdoc/issue-13698.rs @@ -1,6 +1,8 @@ // aux-build:issue-13698.rs // ignore-cross-compile +#![crate_name="issue_13698"] + extern crate issue_13698; pub struct Foo; diff --git a/tests/rustdoc/issue-15169.rs b/tests/rustdoc/issue-15169.rs index e525d85e21e..6408f11e5c1 100644 --- a/tests/rustdoc/issue-15169.rs +++ b/tests/rustdoc/issue-15169.rs @@ -1,3 +1,6 @@ // @has issue_15169/struct.Foo.html '//*[@id="method.eq"]' 'fn eq' + +#![crate_name="issue_15169"] + #[derive(PartialEq)] pub struct Foo; diff --git a/tests/rustdoc/issue-15318-2.rs b/tests/rustdoc/issue-15318-2.rs index 614f2c1c08e..5c31a0694a5 100644 --- a/tests/rustdoc/issue-15318-2.rs +++ b/tests/rustdoc/issue-15318-2.rs @@ -1,5 +1,7 @@ // aux-build:issue-15318.rs // ignore-cross-compile + +#![crate_name="issue_15318_2"] #![no_std] extern crate issue_15318; diff --git a/tests/rustdoc/issue-15318-3.rs b/tests/rustdoc/issue-15318-3.rs index 2dab8f94883..6395edd897d 100644 --- a/tests/rustdoc/issue-15318-3.rs +++ b/tests/rustdoc/issue-15318-3.rs @@ -1,3 +1,4 @@ +#![crate_name="issue_15318_3"] #![feature(rustc_attrs)] // @has issue_15318_3/primitive.pointer.html diff --git a/tests/rustdoc/issue-15318.rs b/tests/rustdoc/issue-15318.rs index 0349fe2854c..dbefc9c3b92 100644 --- a/tests/rustdoc/issue-15318.rs +++ b/tests/rustdoc/issue-15318.rs @@ -1,6 +1,7 @@ // aux-build:issue-15318.rs // ignore-cross-compile +#![crate_name="issue_15318"] #![no_std] extern crate issue_15318; diff --git a/tests/rustdoc/issue-15347.rs b/tests/rustdoc/issue-15347.rs index e93d7401168..8ceda315cc4 100644 --- a/tests/rustdoc/issue-15347.rs +++ b/tests/rustdoc/issue-15347.rs @@ -1,5 +1,7 @@ // compile-flags: -Z unstable-options --document-hidden-items +#![crate_name="issue_15347"] + // @has issue_15347/fn.foo.html #[doc(hidden)] pub fn foo() {} diff --git a/tests/rustdoc/issue-16265-1.rs b/tests/rustdoc/issue-16265-1.rs index 2fda637a641..e13822127b4 100644 --- a/tests/rustdoc/issue-16265-1.rs +++ b/tests/rustdoc/issue-16265-1.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_16265_1"] + pub struct Foo; // @hasraw issue_16265_1/traits/index.html 'source' diff --git a/tests/rustdoc/issue-16265-2.rs b/tests/rustdoc/issue-16265-2.rs index c3eb356171e..adb5a67ce6c 100644 --- a/tests/rustdoc/issue-16265-2.rs +++ b/tests/rustdoc/issue-16265-2.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_16265_2"] + // @hasraw issue_16265_2/index.html 'source' trait Y {} diff --git a/tests/rustdoc/issue-17476.rs b/tests/rustdoc/issue-17476.rs index a5b484c985f..de17af50ccd 100644 --- a/tests/rustdoc/issue-17476.rs +++ b/tests/rustdoc/issue-17476.rs @@ -1,6 +1,8 @@ // aux-build:issue-17476.rs // ignore-cross-compile +#![crate_name="issue_17476"] + extern crate issue_17476; pub struct Foo; diff --git a/tests/rustdoc/issue-19190-2.rs b/tests/rustdoc/issue-19190-2.rs index b6416e2e5b9..17562c356e9 100644 --- a/tests/rustdoc/issue-19190-2.rs +++ b/tests/rustdoc/issue-19190-2.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_19190_2"] + use std::ops::Deref; pub struct Bar; diff --git a/tests/rustdoc/issue-19190-3.rs b/tests/rustdoc/issue-19190-3.rs index 4d34ce6509f..4aeb2ee0891 100644 --- a/tests/rustdoc/issue-19190-3.rs +++ b/tests/rustdoc/issue-19190-3.rs @@ -1,6 +1,8 @@ // aux-build:issue-19190-3.rs // ignore-cross-compile +#![crate_name="issue_19190_3"] + extern crate issue_19190_3; use std::ops::Deref; diff --git a/tests/rustdoc/issue-19190.rs b/tests/rustdoc/issue-19190.rs index 2046273e2c1..9a68a2dec52 100644 --- a/tests/rustdoc/issue-19190.rs +++ b/tests/rustdoc/issue-19190.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_19190"] + use std::ops::Deref; pub struct Foo; diff --git a/tests/rustdoc/issue-20175.rs b/tests/rustdoc/issue-20175.rs index 6a42e2afbf4..5b38ab91af9 100644 --- a/tests/rustdoc/issue-20175.rs +++ b/tests/rustdoc/issue-20175.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_20175"] + pub trait Foo { fn foo(&self) {} } diff --git a/tests/rustdoc/issue-20646.rs b/tests/rustdoc/issue-20646.rs index b2ee9c26014..e8447c61077 100644 --- a/tests/rustdoc/issue-20646.rs +++ b/tests/rustdoc/issue-20646.rs @@ -1,6 +1,7 @@ // aux-build:issue-20646.rs // ignore-cross-compile +#![crate_name="issue_20646"] #![feature(associated_types)] extern crate issue_20646; diff --git a/tests/rustdoc/issue-20727-2.rs b/tests/rustdoc/issue-20727-2.rs index c1aa9617b2e..869ccac8d09 100644 --- a/tests/rustdoc/issue-20727-2.rs +++ b/tests/rustdoc/issue-20727-2.rs @@ -1,6 +1,8 @@ // aux-build:issue-20727.rs // ignore-cross-compile +#![crate_name="issue_20727_2"] + extern crate issue_20727; // @has issue_20727_2/trait.Add.html diff --git a/tests/rustdoc/issue-20727-3.rs b/tests/rustdoc/issue-20727-3.rs index 2f9d91fc5f7..f7ba175c4b9 100644 --- a/tests/rustdoc/issue-20727-3.rs +++ b/tests/rustdoc/issue-20727-3.rs @@ -1,6 +1,8 @@ // aux-build:issue-20727.rs // ignore-cross-compile +#![crate_name="issue_20727_3"] + extern crate issue_20727; pub trait Bar {} diff --git a/tests/rustdoc/issue-20727-4.rs b/tests/rustdoc/issue-20727-4.rs index ec9f18fc3fe..b3df0bb9fc2 100644 --- a/tests/rustdoc/issue-20727-4.rs +++ b/tests/rustdoc/issue-20727-4.rs @@ -1,6 +1,8 @@ // aux-build:issue-20727.rs // ignore-cross-compile +#![crate_name="issue_20727_4"] + extern crate issue_20727; // @has issue_20727_4/trait.Index.html diff --git a/tests/rustdoc/issue-20727.rs b/tests/rustdoc/issue-20727.rs index 266848beef9..ac7485233cc 100644 --- a/tests/rustdoc/issue-20727.rs +++ b/tests/rustdoc/issue-20727.rs @@ -1,6 +1,8 @@ // aux-build:issue-20727.rs // ignore-cross-compile +#![crate_name="issue_20727"] + extern crate issue_20727; // @has issue_20727/trait.Deref.html From 7cd8b2c9253e83c8101a45ccf6e401cd3160650c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 27 Sep 2023 17:15:37 -0700 Subject: [PATCH 3/5] Rename issue-\d+.rs tests to have meaningful names --- tests/rustdoc/{issue-15169.rs => anchor-id-trait-method-15169.rs} | 0 tests/rustdoc/{issue-20646.rs => assoc-type-bindings-20646.rs} | 0 .../{issue-19190-2.rs => deref-methods-19190-foreign-type.rs} | 0 tests/rustdoc/{issue-19190-3.rs => deref-methods-19190-inline.rs} | 0 tests/rustdoc/{issue-19190.rs => deref-methods-19190.rs} | 0 tests/rustdoc/{issue-13698.rs => doc-hidden-method-13698.rs} | 0 tests/rustdoc/{issue-18199.rs => doc-test-attr-18199.rs} | 0 tests/rustdoc/{issue-15347.rs => document-hidden-items-15347.rs} | 0 tests/rustdoc/{issue-12834.rs => highlight-invalid-rust-12834.rs} | 0 tests/rustdoc/{issue-19181.rs => ice-type-error-19181.rs} | 0 tests/rustdoc/{issue-20175.rs => impl-ref-20175.rs} | 0 .../rustdoc/{issue-16265-1.rs => infinite-redirection-16265-1.rs} | 0 .../rustdoc/{issue-16265-2.rs => infinite-redirection-16265-2.rs} | 0 .../{issue-20727-2.rs => inline-assoc-type-20727-bindings.rs} | 0 .../{issue-20727-3.rs => inline-assoc-type-20727-bounds-deref.rs} | 0 .../{issue-20727-4.rs => inline-assoc-type-20727-bounds-index.rs} | 0 .../rustdoc/{issue-20727.rs => inline-assoc-type-20727-bounds.rs} | 0 tests/rustdoc/{issue-16019.rs => macro-ice-16019.rs} | 0 .../{issue-17476.rs => method-link-foreign-trait-impl-17476.rs} | 0 .../{issue-15318-3.rs => primitive-raw-pointer-dox-15318-3.rs} | 0 .../{issue-15318.rs => primitive-raw-pointer-link-15318.rs} | 0 ...5318-2.rs => primitive-raw-pointer-link-no-inlined-15318-2.rs} | 0 22 files changed, 0 insertions(+), 0 deletions(-) rename tests/rustdoc/{issue-15169.rs => anchor-id-trait-method-15169.rs} (100%) rename tests/rustdoc/{issue-20646.rs => assoc-type-bindings-20646.rs} (100%) rename tests/rustdoc/{issue-19190-2.rs => deref-methods-19190-foreign-type.rs} (100%) rename tests/rustdoc/{issue-19190-3.rs => deref-methods-19190-inline.rs} (100%) rename tests/rustdoc/{issue-19190.rs => deref-methods-19190.rs} (100%) rename tests/rustdoc/{issue-13698.rs => doc-hidden-method-13698.rs} (100%) rename tests/rustdoc/{issue-18199.rs => doc-test-attr-18199.rs} (100%) rename tests/rustdoc/{issue-15347.rs => document-hidden-items-15347.rs} (100%) rename tests/rustdoc/{issue-12834.rs => highlight-invalid-rust-12834.rs} (100%) rename tests/rustdoc/{issue-19181.rs => ice-type-error-19181.rs} (100%) rename tests/rustdoc/{issue-20175.rs => impl-ref-20175.rs} (100%) rename tests/rustdoc/{issue-16265-1.rs => infinite-redirection-16265-1.rs} (100%) rename tests/rustdoc/{issue-16265-2.rs => infinite-redirection-16265-2.rs} (100%) rename tests/rustdoc/{issue-20727-2.rs => inline-assoc-type-20727-bindings.rs} (100%) rename tests/rustdoc/{issue-20727-3.rs => inline-assoc-type-20727-bounds-deref.rs} (100%) rename tests/rustdoc/{issue-20727-4.rs => inline-assoc-type-20727-bounds-index.rs} (100%) rename tests/rustdoc/{issue-20727.rs => inline-assoc-type-20727-bounds.rs} (100%) rename tests/rustdoc/{issue-16019.rs => macro-ice-16019.rs} (100%) rename tests/rustdoc/{issue-17476.rs => method-link-foreign-trait-impl-17476.rs} (100%) rename tests/rustdoc/{issue-15318-3.rs => primitive-raw-pointer-dox-15318-3.rs} (100%) rename tests/rustdoc/{issue-15318.rs => primitive-raw-pointer-link-15318.rs} (100%) rename tests/rustdoc/{issue-15318-2.rs => primitive-raw-pointer-link-no-inlined-15318-2.rs} (100%) diff --git a/tests/rustdoc/issue-15169.rs b/tests/rustdoc/anchor-id-trait-method-15169.rs similarity index 100% rename from tests/rustdoc/issue-15169.rs rename to tests/rustdoc/anchor-id-trait-method-15169.rs diff --git a/tests/rustdoc/issue-20646.rs b/tests/rustdoc/assoc-type-bindings-20646.rs similarity index 100% rename from tests/rustdoc/issue-20646.rs rename to tests/rustdoc/assoc-type-bindings-20646.rs diff --git a/tests/rustdoc/issue-19190-2.rs b/tests/rustdoc/deref-methods-19190-foreign-type.rs similarity index 100% rename from tests/rustdoc/issue-19190-2.rs rename to tests/rustdoc/deref-methods-19190-foreign-type.rs diff --git a/tests/rustdoc/issue-19190-3.rs b/tests/rustdoc/deref-methods-19190-inline.rs similarity index 100% rename from tests/rustdoc/issue-19190-3.rs rename to tests/rustdoc/deref-methods-19190-inline.rs diff --git a/tests/rustdoc/issue-19190.rs b/tests/rustdoc/deref-methods-19190.rs similarity index 100% rename from tests/rustdoc/issue-19190.rs rename to tests/rustdoc/deref-methods-19190.rs diff --git a/tests/rustdoc/issue-13698.rs b/tests/rustdoc/doc-hidden-method-13698.rs similarity index 100% rename from tests/rustdoc/issue-13698.rs rename to tests/rustdoc/doc-hidden-method-13698.rs diff --git a/tests/rustdoc/issue-18199.rs b/tests/rustdoc/doc-test-attr-18199.rs similarity index 100% rename from tests/rustdoc/issue-18199.rs rename to tests/rustdoc/doc-test-attr-18199.rs diff --git a/tests/rustdoc/issue-15347.rs b/tests/rustdoc/document-hidden-items-15347.rs similarity index 100% rename from tests/rustdoc/issue-15347.rs rename to tests/rustdoc/document-hidden-items-15347.rs diff --git a/tests/rustdoc/issue-12834.rs b/tests/rustdoc/highlight-invalid-rust-12834.rs similarity index 100% rename from tests/rustdoc/issue-12834.rs rename to tests/rustdoc/highlight-invalid-rust-12834.rs diff --git a/tests/rustdoc/issue-19181.rs b/tests/rustdoc/ice-type-error-19181.rs similarity index 100% rename from tests/rustdoc/issue-19181.rs rename to tests/rustdoc/ice-type-error-19181.rs diff --git a/tests/rustdoc/issue-20175.rs b/tests/rustdoc/impl-ref-20175.rs similarity index 100% rename from tests/rustdoc/issue-20175.rs rename to tests/rustdoc/impl-ref-20175.rs diff --git a/tests/rustdoc/issue-16265-1.rs b/tests/rustdoc/infinite-redirection-16265-1.rs similarity index 100% rename from tests/rustdoc/issue-16265-1.rs rename to tests/rustdoc/infinite-redirection-16265-1.rs diff --git a/tests/rustdoc/issue-16265-2.rs b/tests/rustdoc/infinite-redirection-16265-2.rs similarity index 100% rename from tests/rustdoc/issue-16265-2.rs rename to tests/rustdoc/infinite-redirection-16265-2.rs diff --git a/tests/rustdoc/issue-20727-2.rs b/tests/rustdoc/inline-assoc-type-20727-bindings.rs similarity index 100% rename from tests/rustdoc/issue-20727-2.rs rename to tests/rustdoc/inline-assoc-type-20727-bindings.rs diff --git a/tests/rustdoc/issue-20727-3.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs similarity index 100% rename from tests/rustdoc/issue-20727-3.rs rename to tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs diff --git a/tests/rustdoc/issue-20727-4.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs similarity index 100% rename from tests/rustdoc/issue-20727-4.rs rename to tests/rustdoc/inline-assoc-type-20727-bounds-index.rs diff --git a/tests/rustdoc/issue-20727.rs b/tests/rustdoc/inline-assoc-type-20727-bounds.rs similarity index 100% rename from tests/rustdoc/issue-20727.rs rename to tests/rustdoc/inline-assoc-type-20727-bounds.rs diff --git a/tests/rustdoc/issue-16019.rs b/tests/rustdoc/macro-ice-16019.rs similarity index 100% rename from tests/rustdoc/issue-16019.rs rename to tests/rustdoc/macro-ice-16019.rs diff --git a/tests/rustdoc/issue-17476.rs b/tests/rustdoc/method-link-foreign-trait-impl-17476.rs similarity index 100% rename from tests/rustdoc/issue-17476.rs rename to tests/rustdoc/method-link-foreign-trait-impl-17476.rs diff --git a/tests/rustdoc/issue-15318-3.rs b/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs similarity index 100% rename from tests/rustdoc/issue-15318-3.rs rename to tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs diff --git a/tests/rustdoc/issue-15318.rs b/tests/rustdoc/primitive-raw-pointer-link-15318.rs similarity index 100% rename from tests/rustdoc/issue-15318.rs rename to tests/rustdoc/primitive-raw-pointer-link-15318.rs diff --git a/tests/rustdoc/issue-15318-2.rs b/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs similarity index 100% rename from tests/rustdoc/issue-15318-2.rs rename to tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs From 0487237f1247d2395c50e52640ef547b88fd38be Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 27 Sep 2023 17:22:18 -0700 Subject: [PATCH 4/5] rustdoc: add URLs for test issues --- tests/rustdoc/anchor-id-trait-method-15169.rs | 1 + tests/rustdoc/assoc-type-bindings-20646.rs | 1 + tests/rustdoc/deref-methods-19190-foreign-type.rs | 2 ++ tests/rustdoc/deref-methods-19190-inline.rs | 1 + tests/rustdoc/deref-methods-19190.rs | 1 + tests/rustdoc/doc-hidden-method-13698.rs | 1 + tests/rustdoc/doc-test-attr-18199.rs | 1 + tests/rustdoc/document-hidden-items-15347.rs | 1 + tests/rustdoc/highlight-invalid-rust-12834.rs | 1 + tests/rustdoc/ice-type-error-19181.rs | 1 + tests/rustdoc/impl-ref-20175.rs | 2 ++ tests/rustdoc/infinite-redirection-16265-1.rs | 1 + tests/rustdoc/infinite-redirection-16265-2.rs | 1 + tests/rustdoc/inline-assoc-type-20727-bindings.rs | 1 + tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs | 1 + tests/rustdoc/inline-assoc-type-20727-bounds-index.rs | 1 + tests/rustdoc/inline-assoc-type-20727-bounds.rs | 1 + tests/rustdoc/macro-ice-16019.rs | 2 ++ tests/rustdoc/method-link-foreign-trait-impl-17476.rs | 1 + tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs | 1 + tests/rustdoc/primitive-raw-pointer-link-15318.rs | 1 + tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs | 1 + 22 files changed, 25 insertions(+) diff --git a/tests/rustdoc/anchor-id-trait-method-15169.rs b/tests/rustdoc/anchor-id-trait-method-15169.rs index 6408f11e5c1..26bb59c1875 100644 --- a/tests/rustdoc/anchor-id-trait-method-15169.rs +++ b/tests/rustdoc/anchor-id-trait-method-15169.rs @@ -1,5 +1,6 @@ // @has issue_15169/struct.Foo.html '//*[@id="method.eq"]' 'fn eq' +// https://github.com/rust-lang/rust/issues/15169 #![crate_name="issue_15169"] #[derive(PartialEq)] diff --git a/tests/rustdoc/assoc-type-bindings-20646.rs b/tests/rustdoc/assoc-type-bindings-20646.rs index e8447c61077..375b5b5b23e 100644 --- a/tests/rustdoc/assoc-type-bindings-20646.rs +++ b/tests/rustdoc/assoc-type-bindings-20646.rs @@ -1,6 +1,7 @@ // aux-build:issue-20646.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/20646 #![crate_name="issue_20646"] #![feature(associated_types)] diff --git a/tests/rustdoc/deref-methods-19190-foreign-type.rs b/tests/rustdoc/deref-methods-19190-foreign-type.rs index 17562c356e9..c8326992115 100644 --- a/tests/rustdoc/deref-methods-19190-foreign-type.rs +++ b/tests/rustdoc/deref-methods-19190-foreign-type.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/19190 + #![crate_name="issue_19190_2"] use std::ops::Deref; diff --git a/tests/rustdoc/deref-methods-19190-inline.rs b/tests/rustdoc/deref-methods-19190-inline.rs index 4aeb2ee0891..619b268d68b 100644 --- a/tests/rustdoc/deref-methods-19190-inline.rs +++ b/tests/rustdoc/deref-methods-19190-inline.rs @@ -1,6 +1,7 @@ // aux-build:issue-19190-3.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/19190 #![crate_name="issue_19190_3"] extern crate issue_19190_3; diff --git a/tests/rustdoc/deref-methods-19190.rs b/tests/rustdoc/deref-methods-19190.rs index 9a68a2dec52..4c274d82ff7 100644 --- a/tests/rustdoc/deref-methods-19190.rs +++ b/tests/rustdoc/deref-methods-19190.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/19190 #![crate_name="issue_19190"] use std::ops::Deref; diff --git a/tests/rustdoc/doc-hidden-method-13698.rs b/tests/rustdoc/doc-hidden-method-13698.rs index ead005301a9..f1bd6e73bab 100644 --- a/tests/rustdoc/doc-hidden-method-13698.rs +++ b/tests/rustdoc/doc-hidden-method-13698.rs @@ -1,6 +1,7 @@ // aux-build:issue-13698.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/13698 #![crate_name="issue_13698"] extern crate issue_13698; diff --git a/tests/rustdoc/doc-test-attr-18199.rs b/tests/rustdoc/doc-test-attr-18199.rs index 9cc58b162f3..c9d2235321c 100644 --- a/tests/rustdoc/doc-test-attr-18199.rs +++ b/tests/rustdoc/doc-test-attr-18199.rs @@ -1,4 +1,5 @@ // compile-flags:--test +// https://github.com/rust-lang/rust/issues/18199 #![doc(test(attr(feature(staged_api))))] diff --git a/tests/rustdoc/document-hidden-items-15347.rs b/tests/rustdoc/document-hidden-items-15347.rs index 8ceda315cc4..d8a760e5666 100644 --- a/tests/rustdoc/document-hidden-items-15347.rs +++ b/tests/rustdoc/document-hidden-items-15347.rs @@ -1,4 +1,5 @@ // compile-flags: -Z unstable-options --document-hidden-items +// https://github.com/rust-lang/rust/issues/15347 #![crate_name="issue_15347"] diff --git a/tests/rustdoc/highlight-invalid-rust-12834.rs b/tests/rustdoc/highlight-invalid-rust-12834.rs index 7bc5f682c5a..f8acc500264 100644 --- a/tests/rustdoc/highlight-invalid-rust-12834.rs +++ b/tests/rustdoc/highlight-invalid-rust-12834.rs @@ -1,5 +1,6 @@ // Tests that failing to syntax highlight a rust code-block doesn't cause // rustdoc to fail, while still rendering the code-block (without highlighting). +// https://github.com/rust-lang/rust/issues/12834 #![crate_name="issue_12834"] #![allow(rustdoc::invalid_rust_codeblocks)] diff --git a/tests/rustdoc/ice-type-error-19181.rs b/tests/rustdoc/ice-type-error-19181.rs index 3dea152fc6e..3ced6136664 100644 --- a/tests/rustdoc/ice-type-error-19181.rs +++ b/tests/rustdoc/ice-type-error-19181.rs @@ -1,4 +1,5 @@ // compile-flags:--test +// https://github.com/rust-lang/rust/issues/19181 // rustdoc should not panic when target crate has compilation errors diff --git a/tests/rustdoc/impl-ref-20175.rs b/tests/rustdoc/impl-ref-20175.rs index 5b38ab91af9..a92db2d0a66 100644 --- a/tests/rustdoc/impl-ref-20175.rs +++ b/tests/rustdoc/impl-ref-20175.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/20175 + #![crate_name="issue_20175"] pub trait Foo { diff --git a/tests/rustdoc/infinite-redirection-16265-1.rs b/tests/rustdoc/infinite-redirection-16265-1.rs index e13822127b4..7d72469bd72 100644 --- a/tests/rustdoc/infinite-redirection-16265-1.rs +++ b/tests/rustdoc/infinite-redirection-16265-1.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/16265 #![crate_name="issue_16265_1"] pub struct Foo; diff --git a/tests/rustdoc/infinite-redirection-16265-2.rs b/tests/rustdoc/infinite-redirection-16265-2.rs index adb5a67ce6c..7a4791c5fd4 100644 --- a/tests/rustdoc/infinite-redirection-16265-2.rs +++ b/tests/rustdoc/infinite-redirection-16265-2.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/16265 #![crate_name="issue_16265_2"] // @hasraw issue_16265_2/index.html 'source' diff --git a/tests/rustdoc/inline-assoc-type-20727-bindings.rs b/tests/rustdoc/inline-assoc-type-20727-bindings.rs index 869ccac8d09..e59dec29d03 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bindings.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bindings.rs @@ -1,6 +1,7 @@ // aux-build:issue-20727.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_2"] extern crate issue_20727; diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs index f7ba175c4b9..005ee3e3294 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs @@ -1,6 +1,7 @@ // aux-build:issue-20727.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_3"] extern crate issue_20727; diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs index b3df0bb9fc2..1a3f4cd20c1 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs @@ -1,6 +1,7 @@ // aux-build:issue-20727.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_4"] extern crate issue_20727; diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds.rs b/tests/rustdoc/inline-assoc-type-20727-bounds.rs index ac7485233cc..7cbc8d38107 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds.rs @@ -1,6 +1,7 @@ // aux-build:issue-20727.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727"] extern crate issue_20727; diff --git a/tests/rustdoc/macro-ice-16019.rs b/tests/rustdoc/macro-ice-16019.rs index 239d92378d9..d0f82e0a314 100644 --- a/tests/rustdoc/macro-ice-16019.rs +++ b/tests/rustdoc/macro-ice-16019.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/16019 + macro_rules! define_struct { ($rounds:expr) => ( struct Struct { diff --git a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs b/tests/rustdoc/method-link-foreign-trait-impl-17476.rs index de17af50ccd..e52ab6f38c2 100644 --- a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs +++ b/tests/rustdoc/method-link-foreign-trait-impl-17476.rs @@ -1,5 +1,6 @@ // aux-build:issue-17476.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/17476 #![crate_name="issue_17476"] diff --git a/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs b/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs index 6395edd897d..80c55975687 100644 --- a/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs +++ b/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/15318 #![crate_name="issue_15318_3"] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/primitive-raw-pointer-link-15318.rs b/tests/rustdoc/primitive-raw-pointer-link-15318.rs index dbefc9c3b92..77f25ff4cff 100644 --- a/tests/rustdoc/primitive-raw-pointer-link-15318.rs +++ b/tests/rustdoc/primitive-raw-pointer-link-15318.rs @@ -1,5 +1,6 @@ // aux-build:issue-15318.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/15318 #![crate_name="issue_15318"] #![no_std] diff --git a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs b/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs index 5c31a0694a5..1b35bb185ed 100644 --- a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs +++ b/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs @@ -1,5 +1,6 @@ // aux-build:issue-15318.rs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/15318 #![crate_name="issue_15318_2"] #![no_std] From 5e26e8c5bdd82c507f1ab4fdb29cad6f5861e4bd Mon Sep 17 00:00:00 2001 From: Anshul <83179501+ArchUsr64@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:58:37 +0530 Subject: [PATCH 5/5] changed 'rotate' to 'rotating' --- library/core/src/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 0d635aced85..a19fcf93c4d 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3410,7 +3410,7 @@ pub fn rotate_left(&mut self, mid: usize) { /// assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']); /// ``` /// - /// Rotate a subslice: + /// Rotating a subslice: /// /// ``` /// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];