diff --git a/tests/rustdoc-ui/apit-46976.rs b/tests/rustdoc-ui/apit-46976.rs new file mode 100644 index 0000000000000..c17688e3b1d74 --- /dev/null +++ b/tests/rustdoc-ui/apit-46976.rs @@ -0,0 +1,4 @@ +// check-pass +// https://github.com/rust-lang/rust/issues/46976 + +pub fn ice(f: impl Fn()) {} diff --git a/tests/rustdoc/auxiliary/issue-36031.rs b/tests/rustdoc-ui/auxiliary/issue-36031.rs similarity index 100% rename from tests/rustdoc/auxiliary/issue-36031.rs rename to tests/rustdoc-ui/auxiliary/issue-36031.rs diff --git a/tests/rustdoc/auxiliary/issue-40936.rs b/tests/rustdoc-ui/auxiliary/issue-40936.rs similarity index 100% rename from tests/rustdoc/auxiliary/issue-40936.rs rename to tests/rustdoc-ui/auxiliary/issue-40936.rs diff --git a/tests/rustdoc/auxiliary/issue-48414.rs b/tests/rustdoc-ui/auxiliary/issue-48414.rs similarity index 100% rename from tests/rustdoc/auxiliary/issue-48414.rs rename to tests/rustdoc-ui/auxiliary/issue-48414.rs diff --git a/tests/rustdoc/issue-48414.rs b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs similarity index 79% rename from tests/rustdoc/issue-48414.rs rename to tests/rustdoc-ui/circular-intra-doc-link-48414.rs index b35743d887bf3..46367ccaef9a6 100644 --- a/tests/rustdoc/issue-48414.rs +++ b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs @@ -1,4 +1,7 @@ // aux-build:issue-48414.rs +// check-pass + +// https://github.com/rust-lang/rust/issues/48414 // ICE when resolving paths for a trait that linked to another trait, when both were in an external // crate diff --git a/tests/rustdoc/issue-34423.rs b/tests/rustdoc-ui/hidden-trait-method-34423.rs similarity index 62% rename from tests/rustdoc/issue-34423.rs rename to tests/rustdoc-ui/hidden-trait-method-34423.rs index b429bf8c9ba73..f3107d2379c9a 100644 --- a/tests/rustdoc/issue-34423.rs +++ b/tests/rustdoc-ui/hidden-trait-method-34423.rs @@ -1,3 +1,6 @@ +// check-pass +// https://github.com/rust-lang/rust/issues/34423 + pub struct Foo; pub trait Bar { diff --git a/tests/rustdoc/issue-36031.rs b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs similarity index 69% rename from tests/rustdoc/issue-36031.rs rename to tests/rustdoc-ui/inherent-assoc-consts-36031.rs index af1b32fd22b17..755fc1cfdff29 100644 --- a/tests/rustdoc/issue-36031.rs +++ b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs @@ -1,7 +1,10 @@ // aux-build:issue-36031.rs +// check-pass // build-aux-docs // ignore-cross-compile +// https://github.com/rust-lang/rust/issues/36031 + #![crate_name = "foo"] extern crate issue_36031; diff --git a/tests/rustdoc/issue-46271.rs b/tests/rustdoc-ui/nested-extern-crate-46271.rs similarity index 54% rename from tests/rustdoc/issue-46271.rs rename to tests/rustdoc-ui/nested-extern-crate-46271.rs index b38ef20c551fb..d2ac38f3e4559 100644 --- a/tests/rustdoc/issue-46271.rs +++ b/tests/rustdoc-ui/nested-extern-crate-46271.rs @@ -1,5 +1,8 @@ +// check-pass // hopefully this doesn't cause an ICE +// https://github.com/rust-lang/rust/issues/46271 + pub fn foo() { extern crate std; } diff --git a/tests/rustdoc/issue-47639.rs b/tests/rustdoc-ui/nested-macro-rules-47639.rs similarity index 57% rename from tests/rustdoc/issue-47639.rs rename to tests/rustdoc-ui/nested-macro-rules-47639.rs index 4b3456b86c5e6..210b1e79cd2f5 100644 --- a/tests/rustdoc/issue-47639.rs +++ b/tests/rustdoc-ui/nested-macro-rules-47639.rs @@ -1,4 +1,7 @@ +// check-pass // This should not ICE + +// https://github.com/rust-lang/rust/issues/47639 pub fn test() { macro_rules! foo { () => () diff --git a/tests/rustdoc/issue-40936.rs b/tests/rustdoc-ui/super-glob-40936.rs similarity index 59% rename from tests/rustdoc/issue-40936.rs rename to tests/rustdoc-ui/super-glob-40936.rs index 4d2e4c17b1f9e..a06e977b10a59 100644 --- a/tests/rustdoc/issue-40936.rs +++ b/tests/rustdoc-ui/super-glob-40936.rs @@ -1,6 +1,9 @@ // aux-build:issue-40936.rs +// check-pass // build-aux-docs +// https://github.com/rust-lang/rust/issues/40936 + #![crate_name = "foo"] extern crate issue_40936; diff --git a/tests/rustdoc/doctest/auxiliary/empty.rs b/tests/rustdoc/doctest/auxiliary/empty.rs new file mode 100644 index 0000000000000..d11c69f812a8d --- /dev/null +++ b/tests/rustdoc/doctest/auxiliary/empty.rs @@ -0,0 +1 @@ +// intentionally empty diff --git a/tests/rustdoc/doctest-cfg-feature-30252.rs b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs similarity index 100% rename from tests/rustdoc/doctest-cfg-feature-30252.rs rename to tests/rustdoc/doctest/doctest-cfg-feature-30252.rs diff --git a/tests/rustdoc/issue-38129.rs b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs similarity index 100% rename from tests/rustdoc/issue-38129.rs rename to tests/rustdoc/doctest/doctest-crate-attributes-38129.rs diff --git a/tests/rustdoc/doctest-hide-empty-line-23106.rs b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs similarity index 100% rename from tests/rustdoc/doctest-hide-empty-line-23106.rs rename to tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs diff --git a/tests/rustdoc/doctest-ignore-32556.rs b/tests/rustdoc/doctest/doctest-ignore-32556.rs similarity index 100% rename from tests/rustdoc/doctest-ignore-32556.rs rename to tests/rustdoc/doctest/doctest-ignore-32556.rs diff --git a/tests/rustdoc/issue-43153.rs b/tests/rustdoc/doctest/doctest-include-43153.rs similarity index 81% rename from tests/rustdoc/issue-43153.rs rename to tests/rustdoc/doctest/doctest-include-43153.rs index 0fe680f10af34..ec21a68c4ee51 100644 --- a/tests/rustdoc/issue-43153.rs +++ b/tests/rustdoc/doctest/doctest-include-43153.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/43153 + // Test that `include!` in a doc test searches relative to the directory in // which the test is declared. diff --git a/tests/rustdoc/issue-38219.rs b/tests/rustdoc/doctest/doctest-macro-38219.rs similarity index 68% rename from tests/rustdoc/issue-38219.rs rename to tests/rustdoc/doctest/doctest-macro-38219.rs index fa57c58c76184..6c81df110856e 100644 --- a/tests/rustdoc/issue-38219.rs +++ b/tests/rustdoc/doctest/doctest-macro-38219.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/38219 + // compile-flags:--test // should-fail diff --git a/tests/rustdoc/doctest-manual-crate-name.rs b/tests/rustdoc/doctest/doctest-manual-crate-name.rs similarity index 100% rename from tests/rustdoc/doctest-manual-crate-name.rs rename to tests/rustdoc/doctest/doctest-manual-crate-name.rs diff --git a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs similarity index 100% rename from tests/rustdoc/doctest-markdown-inline-parse-23744.rs rename to tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs diff --git a/tests/rustdoc/issue-48377.rs b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs similarity index 77% rename from tests/rustdoc/issue-48377.rs rename to tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs index c32bcf380ea3b..d481dc0dd7018 100644 --- a/tests/rustdoc/issue-48377.rs +++ b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs @@ -1,5 +1,7 @@ // compile-flags:--test +// https://github.com/rust-lang/rust/issues/48377 + //! This is a doc comment //! //! ```rust diff --git a/tests/rustdoc/doctest-multi-line-string-literal-25944.rs b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs similarity index 100% rename from tests/rustdoc/doctest-multi-line-string-literal-25944.rs rename to tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs diff --git a/tests/rustdoc/issue-46767.rs b/tests/rustdoc/enum-variant-private-46767.rs similarity index 78% rename from tests/rustdoc/issue-46767.rs rename to tests/rustdoc/enum-variant-private-46767.rs index ef6ed104b743b..6386aa75a95e6 100644 --- a/tests/rustdoc/issue-46767.rs +++ b/tests/rustdoc/enum-variant-private-46767.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/46767 #![crate_name = "foo"] mod private { diff --git a/tests/rustdoc/issue-43701.rs b/tests/rustdoc/foreign-implementors-js-43701.rs similarity index 65% rename from tests/rustdoc/issue-43701.rs rename to tests/rustdoc/foreign-implementors-js-43701.rs index de772881e7323..3b16ad2045a3d 100644 --- a/tests/rustdoc/issue-43701.rs +++ b/tests/rustdoc/foreign-implementors-js-43701.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/43701 #![crate_name = "foo"] pub use std::vec::Vec; diff --git a/tests/rustdoc/issue-34473.rs b/tests/rustdoc/inline-rename-34473.rs similarity index 83% rename from tests/rustdoc/issue-34473.rs rename to tests/rustdoc/inline-rename-34473.rs index 37da3dd199975..7bc92cca1afd1 100644 --- a/tests/rustdoc/issue-34473.rs +++ b/tests/rustdoc/inline-rename-34473.rs @@ -1,5 +1,7 @@ #![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/34473 + mod second { pub struct SomeTypeWithLongName; } diff --git a/tests/rustdoc/issue-46766.rs b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs similarity index 72% rename from tests/rustdoc/issue-46766.rs rename to tests/rustdoc/inline_local/enum-variant-reexport-46766.rs index 36ab739565b8e..ea6b7bac4c7a3 100644 --- a/tests/rustdoc/issue-46766.rs +++ b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/46766 #![crate_name = "foo"] pub enum Enum{Variant} diff --git a/tests/rustdoc/issue-43893.rs b/tests/rustdoc/issue-43893.rs deleted file mode 100644 index 95d5519345936..0000000000000 --- a/tests/rustdoc/issue-43893.rs +++ /dev/null @@ -1,19 +0,0 @@ -// ignore-cross-compile - -#![crate_name = "foo"] - -pub trait SomeTrait {} -pub struct SomeStruct; - -// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#9' -impl SomeTrait for usize {} - -// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#12-14' -impl SomeTrait for SomeStruct { - // deliberately multi-line impl -} - -pub trait AnotherTrait {} - -// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#19' -impl AnotherTrait for T {} diff --git a/tests/rustdoc/issue-46976.rs b/tests/rustdoc/issue-46976.rs deleted file mode 100644 index c59f8c72e64c2..0000000000000 --- a/tests/rustdoc/issue-46976.rs +++ /dev/null @@ -1 +0,0 @@ -pub fn ice(f: impl Fn()) {} diff --git a/tests/rustdoc/issue-47038.rs b/tests/rustdoc/private-use-decl-macro-47038.rs similarity index 79% rename from tests/rustdoc/issue-47038.rs rename to tests/rustdoc/private-use-decl-macro-47038.rs index 810ddca3eab80..8944bdd42b4fb 100644 --- a/tests/rustdoc/issue-47038.rs +++ b/tests/rustdoc/private-use-decl-macro-47038.rs @@ -2,6 +2,8 @@ #![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/47038 + use std::vec; // @has 'foo/index.html' diff --git a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs b/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs similarity index 100% rename from tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs rename to tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs diff --git a/tests/rustdoc/src-links-implementor-43893.rs b/tests/rustdoc/src-links-implementor-43893.rs new file mode 100644 index 0000000000000..07e672847ca68 --- /dev/null +++ b/tests/rustdoc/src-links-implementor-43893.rs @@ -0,0 +1,21 @@ +// ignore-cross-compile + +// https://github.com/rust-lang/rust/issues/43893 + +#![crate_name = "foo"] + +pub trait SomeTrait {} +pub struct SomeStruct; + +// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11' +impl SomeTrait for usize {} + +// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16' +impl SomeTrait for SomeStruct { + // deliberately multi-line impl +} + +pub trait AnotherTrait {} + +// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21' +impl AnotherTrait for T {} diff --git a/tests/rustdoc/issue-45584.rs b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs similarity index 90% rename from tests/rustdoc/issue-45584.rs rename to tests/rustdoc/trait-implementations-duplicate-self-45584.rs index 8a5f0413826a9..77b8c05f2fbe0 100644 --- a/tests/rustdoc/issue-45584.rs +++ b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs @@ -1,5 +1,7 @@ #![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/45584 + pub trait Bar {} // @has 'foo/struct.Foo1.html' diff --git a/tests/rustdoc/issue-34928.rs b/tests/rustdoc/tuple-struct-where-clause-34928.rs similarity index 75% rename from tests/rustdoc/issue-34928.rs rename to tests/rustdoc/tuple-struct-where-clause-34928.rs index 4184086f622ab..909b91468931b 100644 --- a/tests/rustdoc/issue-34928.rs +++ b/tests/rustdoc/tuple-struct-where-clause-34928.rs @@ -1,5 +1,7 @@ #![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/34928 + pub trait Bar {} // @has foo/struct.Foo.html '//pre' 'pub struct Foo(pub T) where T: Bar;'