From 5da288f842f5616d58dc98338a833addf8a3cb2b Mon Sep 17 00:00:00 2001 From: jyn Date: Sat, 29 Apr 2023 04:25:04 -0500 Subject: move lint tests into subdirectories --- tests/rustdoc-ui/assoc-item-not-in-scope.rs | 22 --- tests/rustdoc-ui/assoc-item-not-in-scope.stderr | 14 -- tests/rustdoc-ui/bare-urls.fixed | 60 ------- tests/rustdoc-ui/bare-urls.rs | 60 ------- tests/rustdoc-ui/bare-urls.stderr | 143 ----------------- tests/rustdoc-ui/check-attr.rs | 41 ----- tests/rustdoc-ui/check-attr.stderr | 175 --------------------- tests/rustdoc-ui/check-fail.rs | 23 --- tests/rustdoc-ui/check-fail.stderr | 56 ------- tests/rustdoc-ui/check.rs | 15 -- tests/rustdoc-ui/check.stderr | 61 ------- tests/rustdoc-ui/deny-missing-docs-crate.rs | 3 - tests/rustdoc-ui/deny-missing-docs-crate.stderr | 22 --- tests/rustdoc-ui/deny-missing-docs-macro.rs | 8 - tests/rustdoc-ui/deny-missing-docs-macro.stderr | 14 -- tests/rustdoc-ui/doc-attr.rs | 25 --- tests/rustdoc-ui/doc-attr.stderr | 71 --------- tests/rustdoc-ui/doc-spotlight.fixed | 8 - tests/rustdoc-ui/doc-spotlight.rs | 8 - tests/rustdoc-ui/doc-spotlight.stderr | 19 --- tests/rustdoc-ui/doc-without-codeblock.rs | 23 --- tests/rustdoc-ui/doc-without-codeblock.stderr | 38 ----- tests/rustdoc-ui/doc_cfg_hide.rs | 11 -- tests/rustdoc-ui/doc_cfg_hide.stderr | 40 ----- tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs | 157 ------------------ tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr | 28 ---- ...ature-gate-rustdoc_missing_doc_code_examples.rs | 12 -- ...e-gate-rustdoc_missing_doc_code_examples.stderr | 37 ----- .../intra-doc/assoc-item-not-in-scope.rs | 22 +++ .../intra-doc/assoc-item-not-in-scope.stderr | 14 ++ tests/rustdoc-ui/intra-doc/pub-export-lint.rs | 5 + tests/rustdoc-ui/intra-doc/pub-export-lint.stderr | 15 ++ .../intra-doc/reference-link-reports-error-once.rs | 20 +++ .../reference-link-reports-error-once.stderr | 63 ++++++++ tests/rustdoc-ui/intra-doc/reference-links.rs | 6 + tests/rustdoc-ui/intra-doc/reference-links.stderr | 14 ++ tests/rustdoc-ui/invalid-doc-attr.rs | 32 ---- tests/rustdoc-ui/invalid-doc-attr.stderr | 78 --------- tests/rustdoc-ui/invalid-html-self-closing-tag.rs | 70 --------- .../invalid-html-self-closing-tag.stderr | 80 ---------- tests/rustdoc-ui/invalid-html-tags.rs | 123 --------------- tests/rustdoc-ui/invalid-html-tags.stderr | 104 ------------ tests/rustdoc-ui/lint-group.rs | 32 ---- tests/rustdoc-ui/lint-group.stderr | 54 ------- tests/rustdoc-ui/lint-missing-doc-code-example.rs | 101 ------------ .../lint-missing-doc-code-example.stderr | 38 ----- tests/rustdoc-ui/lints/bare-urls.fixed | 60 +++++++ tests/rustdoc-ui/lints/bare-urls.rs | 60 +++++++ tests/rustdoc-ui/lints/bare-urls.stderr | 143 +++++++++++++++++ tests/rustdoc-ui/lints/check-attr.rs | 41 +++++ tests/rustdoc-ui/lints/check-attr.stderr | 175 +++++++++++++++++++++ tests/rustdoc-ui/lints/check-fail.rs | 23 +++ tests/rustdoc-ui/lints/check-fail.stderr | 56 +++++++ tests/rustdoc-ui/lints/check.rs | 15 ++ tests/rustdoc-ui/lints/check.stderr | 61 +++++++ tests/rustdoc-ui/lints/deny-missing-docs-crate.rs | 3 + .../lints/deny-missing-docs-crate.stderr | 22 +++ tests/rustdoc-ui/lints/deny-missing-docs-macro.rs | 8 + .../lints/deny-missing-docs-macro.stderr | 14 ++ tests/rustdoc-ui/lints/doc-attr.rs | 25 +++ tests/rustdoc-ui/lints/doc-attr.stderr | 71 +++++++++ tests/rustdoc-ui/lints/doc-spotlight.fixed | 8 + tests/rustdoc-ui/lints/doc-spotlight.rs | 8 + tests/rustdoc-ui/lints/doc-spotlight.stderr | 19 +++ tests/rustdoc-ui/lints/doc-without-codeblock.rs | 23 +++ .../rustdoc-ui/lints/doc-without-codeblock.stderr | 38 +++++ tests/rustdoc-ui/lints/doc_cfg_hide.rs | 11 ++ tests/rustdoc-ui/lints/doc_cfg_hide.stderr | 40 +++++ .../rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs | 157 ++++++++++++++++++ .../lints/expect-tool-lint-rfc-2383.stderr | 28 ++++ ...ature-gate-rustdoc_missing_doc_code_examples.rs | 12 ++ ...e-gate-rustdoc_missing_doc_code_examples.stderr | 37 +++++ tests/rustdoc-ui/lints/invalid-doc-attr.rs | 32 ++++ tests/rustdoc-ui/lints/invalid-doc-attr.stderr | 78 +++++++++ .../lints/invalid-html-self-closing-tag.rs | 70 +++++++++ .../lints/invalid-html-self-closing-tag.stderr | 80 ++++++++++ tests/rustdoc-ui/lints/invalid-html-tags.rs | 123 +++++++++++++++ tests/rustdoc-ui/lints/invalid-html-tags.stderr | 104 ++++++++++++ tests/rustdoc-ui/lints/lint-group.rs | 32 ++++ tests/rustdoc-ui/lints/lint-group.stderr | 54 +++++++ .../lints/lint-missing-doc-code-example.rs | 101 ++++++++++++ .../lints/lint-missing-doc-code-example.stderr | 38 +++++ tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs | 6 + .../lints/no-crate-level-doc-lint.stderr | 12 ++ .../rustdoc-ui/lints/renamed-lint-still-applies.rs | 10 ++ .../lints/renamed-lint-still-applies.stderr | 42 +++++ .../lints/rustdoc-all-only-stable-lints.rs | 6 + tests/rustdoc-ui/lints/unknown-renamed-lints.rs | 24 +++ .../rustdoc-ui/lints/unknown-renamed-lints.stderr | 62 ++++++++ tests/rustdoc-ui/lints/unused-braces-lint.rs | 14 ++ tests/rustdoc-ui/lints/unused.rs | 14 ++ tests/rustdoc-ui/no-crate-level-doc-lint.rs | 6 - tests/rustdoc-ui/no-crate-level-doc-lint.stderr | 12 -- tests/rustdoc-ui/pub-export-lint.rs | 5 - tests/rustdoc-ui/pub-export-lint.stderr | 15 -- .../reference-link-reports-error-once.rs | 20 --- .../reference-link-reports-error-once.stderr | 63 -------- tests/rustdoc-ui/reference-links.rs | 6 - tests/rustdoc-ui/reference-links.stderr | 14 -- tests/rustdoc-ui/renamed-lint-still-applies.rs | 10 -- tests/rustdoc-ui/renamed-lint-still-applies.stderr | 42 ----- tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs | 6 - tests/rustdoc-ui/unknown-renamed-lints.rs | 24 --- tests/rustdoc-ui/unknown-renamed-lints.stderr | 62 -------- tests/rustdoc-ui/unused-braces-lint.rs | 14 -- tests/rustdoc-ui/unused.rs | 14 -- 106 files changed, 2219 insertions(+), 2219 deletions(-) delete mode 100644 tests/rustdoc-ui/assoc-item-not-in-scope.rs delete mode 100644 tests/rustdoc-ui/assoc-item-not-in-scope.stderr delete mode 100644 tests/rustdoc-ui/bare-urls.fixed delete mode 100644 tests/rustdoc-ui/bare-urls.rs delete mode 100644 tests/rustdoc-ui/bare-urls.stderr delete mode 100644 tests/rustdoc-ui/check-attr.rs delete mode 100644 tests/rustdoc-ui/check-attr.stderr delete mode 100644 tests/rustdoc-ui/check-fail.rs delete mode 100644 tests/rustdoc-ui/check-fail.stderr delete mode 100644 tests/rustdoc-ui/check.rs delete mode 100644 tests/rustdoc-ui/check.stderr delete mode 100644 tests/rustdoc-ui/deny-missing-docs-crate.rs delete mode 100644 tests/rustdoc-ui/deny-missing-docs-crate.stderr delete mode 100644 tests/rustdoc-ui/deny-missing-docs-macro.rs delete mode 100644 tests/rustdoc-ui/deny-missing-docs-macro.stderr delete mode 100644 tests/rustdoc-ui/doc-attr.rs delete mode 100644 tests/rustdoc-ui/doc-attr.stderr delete mode 100644 tests/rustdoc-ui/doc-spotlight.fixed delete mode 100644 tests/rustdoc-ui/doc-spotlight.rs delete mode 100644 tests/rustdoc-ui/doc-spotlight.stderr delete mode 100644 tests/rustdoc-ui/doc-without-codeblock.rs delete mode 100644 tests/rustdoc-ui/doc-without-codeblock.stderr delete mode 100644 tests/rustdoc-ui/doc_cfg_hide.rs delete mode 100644 tests/rustdoc-ui/doc_cfg_hide.stderr delete mode 100644 tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs delete mode 100644 tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr delete mode 100644 tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs delete mode 100644 tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr create mode 100644 tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs create mode 100644 tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr create mode 100644 tests/rustdoc-ui/intra-doc/pub-export-lint.rs create mode 100644 tests/rustdoc-ui/intra-doc/pub-export-lint.stderr create mode 100644 tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs create mode 100644 tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr create mode 100644 tests/rustdoc-ui/intra-doc/reference-links.rs create mode 100644 tests/rustdoc-ui/intra-doc/reference-links.stderr delete mode 100644 tests/rustdoc-ui/invalid-doc-attr.rs delete mode 100644 tests/rustdoc-ui/invalid-doc-attr.stderr delete mode 100644 tests/rustdoc-ui/invalid-html-self-closing-tag.rs delete mode 100644 tests/rustdoc-ui/invalid-html-self-closing-tag.stderr delete mode 100644 tests/rustdoc-ui/invalid-html-tags.rs delete mode 100644 tests/rustdoc-ui/invalid-html-tags.stderr delete mode 100644 tests/rustdoc-ui/lint-group.rs delete mode 100644 tests/rustdoc-ui/lint-group.stderr delete mode 100644 tests/rustdoc-ui/lint-missing-doc-code-example.rs delete mode 100644 tests/rustdoc-ui/lint-missing-doc-code-example.stderr create mode 100644 tests/rustdoc-ui/lints/bare-urls.fixed create mode 100644 tests/rustdoc-ui/lints/bare-urls.rs create mode 100644 tests/rustdoc-ui/lints/bare-urls.stderr create mode 100644 tests/rustdoc-ui/lints/check-attr.rs create mode 100644 tests/rustdoc-ui/lints/check-attr.stderr create mode 100644 tests/rustdoc-ui/lints/check-fail.rs create mode 100644 tests/rustdoc-ui/lints/check-fail.stderr create mode 100644 tests/rustdoc-ui/lints/check.rs create mode 100644 tests/rustdoc-ui/lints/check.stderr create mode 100644 tests/rustdoc-ui/lints/deny-missing-docs-crate.rs create mode 100644 tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr create mode 100644 tests/rustdoc-ui/lints/deny-missing-docs-macro.rs create mode 100644 tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr create mode 100644 tests/rustdoc-ui/lints/doc-attr.rs create mode 100644 tests/rustdoc-ui/lints/doc-attr.stderr create mode 100644 tests/rustdoc-ui/lints/doc-spotlight.fixed create mode 100644 tests/rustdoc-ui/lints/doc-spotlight.rs create mode 100644 tests/rustdoc-ui/lints/doc-spotlight.stderr create mode 100644 tests/rustdoc-ui/lints/doc-without-codeblock.rs create mode 100644 tests/rustdoc-ui/lints/doc-without-codeblock.stderr create mode 100644 tests/rustdoc-ui/lints/doc_cfg_hide.rs create mode 100644 tests/rustdoc-ui/lints/doc_cfg_hide.stderr create mode 100644 tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs create mode 100644 tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr create mode 100644 tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs create mode 100644 tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr create mode 100644 tests/rustdoc-ui/lints/invalid-doc-attr.rs create mode 100644 tests/rustdoc-ui/lints/invalid-doc-attr.stderr create mode 100644 tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs create mode 100644 tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr create mode 100644 tests/rustdoc-ui/lints/invalid-html-tags.rs create mode 100644 tests/rustdoc-ui/lints/invalid-html-tags.stderr create mode 100644 tests/rustdoc-ui/lints/lint-group.rs create mode 100644 tests/rustdoc-ui/lints/lint-group.stderr create mode 100644 tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs create mode 100644 tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr create mode 100644 tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs create mode 100644 tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr create mode 100644 tests/rustdoc-ui/lints/renamed-lint-still-applies.rs create mode 100644 tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr create mode 100644 tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs create mode 100644 tests/rustdoc-ui/lints/unknown-renamed-lints.rs create mode 100644 tests/rustdoc-ui/lints/unknown-renamed-lints.stderr create mode 100644 tests/rustdoc-ui/lints/unused-braces-lint.rs create mode 100644 tests/rustdoc-ui/lints/unused.rs delete mode 100644 tests/rustdoc-ui/no-crate-level-doc-lint.rs delete mode 100644 tests/rustdoc-ui/no-crate-level-doc-lint.stderr delete mode 100644 tests/rustdoc-ui/pub-export-lint.rs delete mode 100644 tests/rustdoc-ui/pub-export-lint.stderr delete mode 100644 tests/rustdoc-ui/reference-link-reports-error-once.rs delete mode 100644 tests/rustdoc-ui/reference-link-reports-error-once.stderr delete mode 100644 tests/rustdoc-ui/reference-links.rs delete mode 100644 tests/rustdoc-ui/reference-links.stderr delete mode 100644 tests/rustdoc-ui/renamed-lint-still-applies.rs delete mode 100644 tests/rustdoc-ui/renamed-lint-still-applies.stderr delete mode 100644 tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs delete mode 100644 tests/rustdoc-ui/unknown-renamed-lints.rs delete mode 100644 tests/rustdoc-ui/unknown-renamed-lints.stderr delete mode 100644 tests/rustdoc-ui/unused-braces-lint.rs delete mode 100644 tests/rustdoc-ui/unused.rs diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.rs b/tests/rustdoc-ui/assoc-item-not-in-scope.rs deleted file mode 100644 index 0976515f4a4..00000000000 --- a/tests/rustdoc-ui/assoc-item-not-in-scope.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![deny(rustdoc::broken_intra_doc_links)] - -#[derive(Debug)] -/// Link to [`S::fmt`] -//~^ ERROR unresolved link -pub struct S; - -pub mod inner { - use std::fmt::Debug; - use super::S; - - /// Link to [`S::fmt`] - pub fn f() {} -} - -pub mod ambiguous { - use std::fmt::{Display, Debug}; - use super::S; - - /// Link to [`S::fmt`] - pub fn f() {} -} diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr b/tests/rustdoc-ui/assoc-item-not-in-scope.stderr deleted file mode 100644 index 04594ad4142..00000000000 --- a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: unresolved link to `S::fmt` - --> $DIR/assoc-item-not-in-scope.rs:4:15 - | -LL | /// Link to [`S::fmt`] - | ^^^^^^ the struct `S` has no field or associated item named `fmt` - | -note: the lint level is defined here - --> $DIR/assoc-item-not-in-scope.rs:1:9 - | -LL | #![deny(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/tests/rustdoc-ui/bare-urls.fixed b/tests/rustdoc-ui/bare-urls.fixed deleted file mode 100644 index 23aa5c44c21..00000000000 --- a/tests/rustdoc-ui/bare-urls.fixed +++ /dev/null @@ -1,60 +0,0 @@ -// run-rustfix - -#![deny(rustdoc::bare_urls)] - -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// -//~^ ERROR this URL is not a hyperlink -/// hey! -//~^ ERROR this URL is not a hyperlink -pub fn c() {} - -/// -/// [a](http://a.com) -/// [b] -/// -/// [b]: http://b.com -/// -/// ``` -/// This link should not be linted: http://example.com -/// -/// Nor this one: or this one: [x](http://example.com) -/// ``` -/// -/// [should_not.lint](should_not.lint) -pub fn everything_is_fine_here() {} - -#[allow(rustdoc::bare_urls)] -pub mod foo { - /// https://somewhere.com/a?hello=12&bye=11#xyz - pub fn bar() {} -} diff --git a/tests/rustdoc-ui/bare-urls.rs b/tests/rustdoc-ui/bare-urls.rs deleted file mode 100644 index 592f57343bc..00000000000 --- a/tests/rustdoc-ui/bare-urls.rs +++ /dev/null @@ -1,60 +0,0 @@ -// run-rustfix - -#![deny(rustdoc::bare_urls)] - -/// https://somewhere.com -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a -//~^ ERROR this URL is not a hyperlink -/// https://www.somewhere.com -//~^ ERROR this URL is not a hyperlink -/// https://www.somewhere.com/a -//~^ ERROR this URL is not a hyperlink -/// https://subdomain.example.com -//~^ ERROR not a hyperlink -/// https://somewhere.com? -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a? -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a?hello=12 -//~^ ERROR this URL is not a hyperlink -/// https://example.com?hello=12#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com/a?hello=12#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com#xyz -//~^ ERROR this URL is not a hyperlink -/// https://example.com/a#xyz -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12&bye=11 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com/a?hello=12&bye=11 -//~^ ERROR this URL is not a hyperlink -/// https://somewhere.com?hello=12&bye=11#xyz -//~^ ERROR this URL is not a hyperlink -/// hey! https://somewhere.com/a?hello=12&bye=11#xyz -//~^ ERROR this URL is not a hyperlink -pub fn c() {} - -/// -/// [a](http://a.com) -/// [b] -/// -/// [b]: http://b.com -/// -/// ``` -/// This link should not be linted: http://example.com -/// -/// Nor this one: or this one: [x](http://example.com) -/// ``` -/// -/// [should_not.lint](should_not.lint) -pub fn everything_is_fine_here() {} - -#[allow(rustdoc::bare_urls)] -pub mod foo { - /// https://somewhere.com/a?hello=12&bye=11#xyz - pub fn bar() {} -} diff --git a/tests/rustdoc-ui/bare-urls.stderr b/tests/rustdoc-ui/bare-urls.stderr deleted file mode 100644 index ccf52cd0b93..00000000000 --- a/tests/rustdoc-ui/bare-urls.stderr +++ /dev/null @@ -1,143 +0,0 @@ -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:5:5 - | -LL | /// https://somewhere.com - | ^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links -note: the lint level is defined here - --> $DIR/bare-urls.rs:3:9 - | -LL | #![deny(rustdoc::bare_urls)] - | ^^^^^^^^^^^^^^^^^^ - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:7:5 - | -LL | /// https://somewhere.com/a - | ^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:9:5 - | -LL | /// https://www.somewhere.com - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:11:5 - | -LL | /// https://www.somewhere.com/a - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:13:5 - | -LL | /// https://subdomain.example.com - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:15:5 - | -LL | /// https://somewhere.com? - | ^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:17:5 - | -LL | /// https://somewhere.com/a? - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:19:5 - | -LL | /// https://somewhere.com?hello=12 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:21:5 - | -LL | /// https://somewhere.com/a?hello=12 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:23:5 - | -LL | /// https://example.com?hello=12#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:25:5 - | -LL | /// https://example.com/a?hello=12#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:27:5 - | -LL | /// https://example.com#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:29:5 - | -LL | /// https://example.com/a#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:31:5 - | -LL | /// https://somewhere.com?hello=12&bye=11 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:33:5 - | -LL | /// https://somewhere.com/a?hello=12&bye=11 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:35:5 - | -LL | /// https://somewhere.com?hello=12&bye=11#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: this URL is not a hyperlink - --> $DIR/bare-urls.rs:37:10 - | -LL | /// hey! https://somewhere.com/a?hello=12&bye=11#xyz - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `` - | - = note: bare URLs are not automatically turned into clickable links - -error: aborting due to 17 previous errors - diff --git a/tests/rustdoc-ui/check-attr.rs b/tests/rustdoc-ui/check-attr.rs deleted file mode 100644 index 0b3f7bedda5..00000000000 --- a/tests/rustdoc-ui/check-attr.rs +++ /dev/null @@ -1,41 +0,0 @@ -#![deny(rustdoc::invalid_codeblock_attributes)] - -/// foo -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```compile-fail,compilefail,comPile_fail -/// boo -/// ``` -pub fn foo() {} - -/// bar -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```should-panic,shouldpanic,sHould_panic -/// boo -/// ``` -pub fn bar() {} - -/// foobar -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```no-run,norun,no_Run -/// boo -/// ``` -pub fn foobar() {} - -/// b -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -/// -/// ```test-harness,testharness,teSt_harness -/// boo -/// ``` -pub fn b() {} diff --git a/tests/rustdoc-ui/check-attr.stderr b/tests/rustdoc-ui/check-attr.stderr deleted file mode 100644 index f66e63ab727..00000000000 --- a/tests/rustdoc-ui/check-attr.stderr +++ /dev/null @@ -1,175 +0,0 @@ -error: unknown attribute `compile-fail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully -note: the lint level is defined here - --> $DIR/check-attr.rs:1:9 - | -LL | #![deny(rustdoc::invalid_codeblock_attributes)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unknown attribute `compilefail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `comPile_fail`. Did you mean `compile_fail`? - --> $DIR/check-attr.rs:3:1 - | -LL | / /// foo -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully - -error: unknown attribute `should-panic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `shouldpanic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `sHould_panic`. Did you mean `should_panic`? - --> $DIR/check-attr.rs:13:1 - | -LL | / /// bar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running - -error: unknown attribute `no-run`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `norun`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `no_Run`. Did you mean `no_run`? - --> $DIR/check-attr.rs:23:1 - | -LL | / /// foobar -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want) - -error: unknown attribute `test-harness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: unknown attribute `teSt_harness`. Did you mean `test_harness`? - --> $DIR/check-attr.rs:33:1 - | -LL | / /// b -LL | | -LL | | -LL | | -... | -LL | | /// boo -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: aborting due to 12 previous errors - diff --git a/tests/rustdoc-ui/check-fail.rs b/tests/rustdoc-ui/check-fail.rs deleted file mode 100644 index 02632b4ce7d..00000000000 --- a/tests/rustdoc-ui/check-fail.rs +++ /dev/null @@ -1,23 +0,0 @@ -// compile-flags: -Z unstable-options --check - -#![feature(rustdoc_missing_doc_code_examples)] -#![deny(missing_docs)] -#![deny(rustdoc::missing_doc_code_examples)] -#![deny(rustdoc::all)] - -//! ```rust,testharness -//~^ ERROR -//! let x = 12; -//! ``` - -pub fn foo() {} -//~^ ERROR -//~^^ ERROR - -/// hello -//~^ ERROR -/// -/// ```rust,testharness -/// let x = 12; -/// ``` -pub fn bar() {} diff --git a/tests/rustdoc-ui/check-fail.stderr b/tests/rustdoc-ui/check-fail.stderr deleted file mode 100644 index f05e457af64..00000000000 --- a/tests/rustdoc-ui/check-fail.stderr +++ /dev/null @@ -1,56 +0,0 @@ -error: missing documentation for a function - --> $DIR/check-fail.rs:13:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/check-fail.rs:4:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/check-fail.rs:13:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/check-fail.rs:5:9 - | -LL | #![deny(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-fail.rs:8:1 - | -LL | / //! ```rust,testharness -LL | | -LL | | //! let x = 12; -LL | | //! ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function -note: the lint level is defined here - --> $DIR/check-fail.rs:6:9 - | -LL | #![deny(rustdoc::all)] - | ^^^^^^^^^^^^ - = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]` - -error: unknown attribute `testharness`. Did you mean `test_harness`? - --> $DIR/check-fail.rs:17:1 - | -LL | / /// hello -LL | | -LL | | /// -LL | | /// ```rust,testharness -LL | | /// let x = 12; -LL | | /// ``` - | |_______^ - | - = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function - -error: aborting due to 4 previous errors - diff --git a/tests/rustdoc-ui/check.rs b/tests/rustdoc-ui/check.rs deleted file mode 100644 index e389a81bb33..00000000000 --- a/tests/rustdoc-ui/check.rs +++ /dev/null @@ -1,15 +0,0 @@ -// check-pass -// compile-flags: -Z unstable-options --check -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" - -#![feature(rustdoc_missing_doc_code_examples)] -//~^ WARN -//~^^ WARN - -#![warn(missing_docs)] -#![warn(rustdoc::missing_doc_code_examples)] -#![warn(rustdoc::all)] - -pub fn foo() {} -//~^ WARN -//~^^ WARN diff --git a/tests/rustdoc-ui/check.stderr b/tests/rustdoc-ui/check.stderr deleted file mode 100644 index c5ed5d0c3ef..00000000000 --- a/tests/rustdoc-ui/check.stderr +++ /dev/null @@ -1,61 +0,0 @@ -warning: missing documentation for the crate - --> $DIR/check.rs:5:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | -LL | | -LL | | -... | -LL | | -LL | | pub fn foo() {} - | |_______________^ - | -note: the lint level is defined here - --> $DIR/check.rs:9:9 - | -LL | #![warn(missing_docs)] - | ^^^^^^^^^^^^ - -warning: missing documentation for a function - --> $DIR/check.rs:13:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^ - -warning: no documentation found for this crate's top-level module - | - = help: The following guide may be of use: - https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html -note: the lint level is defined here - --> $DIR/check.rs:11:9 - | -LL | #![warn(rustdoc::all)] - | ^^^^^^^^^^^^ - = note: `#[warn(rustdoc::missing_crate_level_docs)]` implied by `#[warn(rustdoc::all)]` - -warning: missing code example in this documentation - --> $DIR/check.rs:5:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | -LL | | -LL | | -... | -LL | | -LL | | pub fn foo() {} - | |_______________^ - | -note: the lint level is defined here - --> $DIR/check.rs:10:9 - | -LL | #![warn(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: missing code example in this documentation - --> $DIR/check.rs:13:1 - | -LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ - -warning: 5 warnings emitted - diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.rs b/tests/rustdoc-ui/deny-missing-docs-crate.rs deleted file mode 100644 index b74eba3f66b..00000000000 --- a/tests/rustdoc-ui/deny-missing-docs-crate.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![deny(missing_docs)] //~ ERROR - -pub struct Foo; //~ ERROR diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.stderr b/tests/rustdoc-ui/deny-missing-docs-crate.stderr deleted file mode 100644 index 5025b0b0ca8..00000000000 --- a/tests/rustdoc-ui/deny-missing-docs-crate.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: missing documentation for the crate - --> $DIR/deny-missing-docs-crate.rs:1:1 - | -LL | / #![deny(missing_docs)] -LL | | -LL | | pub struct Foo; - | |_______________^ - | -note: the lint level is defined here - --> $DIR/deny-missing-docs-crate.rs:1:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: missing documentation for a struct - --> $DIR/deny-missing-docs-crate.rs:3:1 - | -LL | pub struct Foo; - | ^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.rs b/tests/rustdoc-ui/deny-missing-docs-macro.rs deleted file mode 100644 index b1c1253176b..00000000000 --- a/tests/rustdoc-ui/deny-missing-docs-macro.rs +++ /dev/null @@ -1,8 +0,0 @@ -//! foo - -#![deny(missing_docs)] - -#[macro_export] -macro_rules! foo { //~ ERROR - () => {} -} diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.stderr b/tests/rustdoc-ui/deny-missing-docs-macro.stderr deleted file mode 100644 index 0867b08183e..00000000000 --- a/tests/rustdoc-ui/deny-missing-docs-macro.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: missing documentation for a macro - --> $DIR/deny-missing-docs-macro.rs:6:1 - | -LL | macro_rules! foo { - | ^^^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/deny-missing-docs-macro.rs:3:9 - | -LL | #![deny(missing_docs)] - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/tests/rustdoc-ui/doc-attr.rs b/tests/rustdoc-ui/doc-attr.rs deleted file mode 100644 index 980d1c0e207..00000000000 --- a/tests/rustdoc-ui/doc-attr.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![crate_type = "lib"] -#![deny(warnings)] -#![doc(as_ptr)] -//~^ ERROR unknown `doc` attribute -//~^^ WARN - -#[doc(as_ptr)] -//~^ ERROR unknown `doc` attribute -//~^^ WARN -pub fn foo() {} - -#[doc(123)] -//~^ ERROR invalid `doc` attribute -//~| WARN -#[doc("hello", "bar")] -//~^ ERROR invalid `doc` attribute -//~| WARN -//~| ERROR invalid `doc` attribute -//~| WARN -#[doc(foo::bar, crate::bar::baz = "bye")] -//~^ ERROR unknown `doc` attribute -//~| WARN -//~| ERROR unknown `doc` attribute -//~| WARN -fn bar() {} diff --git a/tests/rustdoc-ui/doc-attr.stderr b/tests/rustdoc-ui/doc-attr.stderr deleted file mode 100644 index 68df2771fd7..00000000000 --- a/tests/rustdoc-ui/doc-attr.stderr +++ /dev/null @@ -1,71 +0,0 @@ -error: unknown `doc` attribute `as_ptr` - --> $DIR/doc-attr.rs:7:7 - | -LL | #[doc(as_ptr)] - | ^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 -note: the lint level is defined here - --> $DIR/doc-attr.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:12:7 - | -LL | #[doc(123)] - | ^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:15:7 - | -LL | #[doc("hello", "bar")] - | ^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: invalid `doc` attribute - --> $DIR/doc-attr.rs:15:16 - | -LL | #[doc("hello", "bar")] - | ^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `foo::bar` - --> $DIR/doc-attr.rs:20:7 - | -LL | #[doc(foo::bar, crate::bar::baz = "bye")] - | ^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `crate::bar::baz` - --> $DIR/doc-attr.rs:20:17 - | -LL | #[doc(foo::bar, crate::bar::baz = "bye")] - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: unknown `doc` attribute `as_ptr` - --> $DIR/doc-attr.rs:3:8 - | -LL | #![doc(as_ptr)] - | ^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: aborting due to 7 previous errors - diff --git a/tests/rustdoc-ui/doc-spotlight.fixed b/tests/rustdoc-ui/doc-spotlight.fixed deleted file mode 100644 index 4b58778eacd..00000000000 --- a/tests/rustdoc-ui/doc-spotlight.fixed +++ /dev/null @@ -1,8 +0,0 @@ -// run-rustfix -#![deny(warnings)] -#![feature(doc_notable_trait)] - -#[doc(notable_trait)] -//~^ ERROR unknown `doc` attribute `spotlight` -//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -trait MyTrait {} diff --git a/tests/rustdoc-ui/doc-spotlight.rs b/tests/rustdoc-ui/doc-spotlight.rs deleted file mode 100644 index 16e38724580..00000000000 --- a/tests/rustdoc-ui/doc-spotlight.rs +++ /dev/null @@ -1,8 +0,0 @@ -// run-rustfix -#![deny(warnings)] -#![feature(doc_notable_trait)] - -#[doc(spotlight)] -//~^ ERROR unknown `doc` attribute `spotlight` -//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -trait MyTrait {} diff --git a/tests/rustdoc-ui/doc-spotlight.stderr b/tests/rustdoc-ui/doc-spotlight.stderr deleted file mode 100644 index 58612327ff9..00000000000 --- a/tests/rustdoc-ui/doc-spotlight.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: unknown `doc` attribute `spotlight` - --> $DIR/doc-spotlight.rs:5:7 - | -LL | #[doc(spotlight)] - | ^^^^^^^^^ help: use `notable_trait` instead - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: `doc(spotlight)` was renamed to `doc(notable_trait)` - = note: `doc(spotlight)` is now a no-op -note: the lint level is defined here - --> $DIR/doc-spotlight.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` - -error: aborting due to previous error - diff --git a/tests/rustdoc-ui/doc-without-codeblock.rs b/tests/rustdoc-ui/doc-without-codeblock.rs deleted file mode 100644 index 86d7c83d335..00000000000 --- a/tests/rustdoc-ui/doc-without-codeblock.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![feature(rustdoc_missing_doc_code_examples)] //~ ERROR missing code example in this documentation -#![deny(rustdoc::missing_doc_code_examples)] - -/// Some docs. -//~^ ERROR missing code example in this documentation -pub struct Foo; - -/// And then, the princess died. -//~^ ERROR missing code example in this documentation -pub mod foo { - /// Or maybe not because she saved herself! - //~^ ERROR missing code example in this documentation - pub fn bar() {} -} - -// This impl is here to ensure the lint isn't emitted for foreign traits implementations. -impl std::ops::Neg for Foo { - type Output = Self; - - fn neg(self) -> Self::Output { - Self - } -} diff --git a/tests/rustdoc-ui/doc-without-codeblock.stderr b/tests/rustdoc-ui/doc-without-codeblock.stderr deleted file mode 100644 index ebf2a2d54f7..00000000000 --- a/tests/rustdoc-ui/doc-without-codeblock.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:1:1 - | -LL | / #![feature(rustdoc_missing_doc_code_examples)] -LL | | #![deny(rustdoc::missing_doc_code_examples)] -LL | | -LL | | /// Some docs. -... | -LL | | } -LL | | } - | |_^ - | -note: the lint level is defined here - --> $DIR/doc-without-codeblock.rs:2:9 - | -LL | #![deny(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:8:1 - | -LL | /// And then, the princess died. - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:11:5 - | -LL | /// Or maybe not because she saved herself! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:4:1 - | -LL | /// Some docs. - | ^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - diff --git a/tests/rustdoc-ui/doc_cfg_hide.rs b/tests/rustdoc-ui/doc_cfg_hide.rs deleted file mode 100644 index 5d8791748a0..00000000000 --- a/tests/rustdoc-ui/doc_cfg_hide.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![feature(doc_cfg_hide)] -#![deny(warnings)] - -#![doc(cfg_hide = "test")] //~ ERROR -//~^ WARN -#![doc(cfg_hide)] //~ ERROR -//~^ WARN - -#[doc(cfg_hide(doc))] //~ ERROR -//~^ WARN -pub fn foo() {} diff --git a/tests/rustdoc-ui/doc_cfg_hide.stderr b/tests/rustdoc-ui/doc_cfg_hide.stderr deleted file mode 100644 index b7e8870fdf5..00000000000 --- a/tests/rustdoc-ui/doc_cfg_hide.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error: this attribute can only be applied at the crate level - --> $DIR/doc_cfg_hide.rs:9:7 - | -LL | #[doc(cfg_hide(doc))] - | ^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information -note: the lint level is defined here - --> $DIR/doc_cfg_hide.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` -help: to apply to the crate, use an inner attribute - | -LL | #![doc(cfg_hide(doc))] - | + - -error: `#[doc(cfg_hide(...)]` takes a list of attributes - --> $DIR/doc_cfg_hide.rs:4:8 - | -LL | #![doc(cfg_hide = "test")] - | ^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: `#[doc(cfg_hide(...)]` takes a list of attributes - --> $DIR/doc_cfg_hide.rs:6:8 - | -LL | #![doc(cfg_hide)] - | ^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - -error: aborting due to 3 previous errors - diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs b/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs deleted file mode 100644 index 0901ac3640f..00000000000 --- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs +++ /dev/null @@ -1,157 +0,0 @@ -// check-pass -#![feature(lint_reasons)] - -//! This file tests the `#[expect]` attribute implementation for tool lints. The same -//! file is used to test clippy and rustdoc. Any changes to this file should be synced -//! to the other test files as well. -//! -//! Expectations: -//! * rustc: only rustc lint expectations are emitted -//! * clippy: rustc and Clippy's expectations are emitted -//! * rustdoc: only rustdoc lint expectations are emitted -//! -//! This test can't cover every lint from Clippy, rustdoc and potentially other -//! tools that will be developed. This therefore only tests a small subset of lints - -#![expect(rustdoc::missing_crate_level_docs)] -//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] -//~| NOTE `#[warn(unfulfilled_lint_expectations)]` on by default - -mod rustc_ok { - //! See - - #[expect(dead_code)] - pub fn rustc_lints() { - let x = 42.0; - - #[expect(illegal_floating_point_literal_pattern)] - match x { - 5.0 => {} - 6.0 => {} - _ => {} - } - } -} - -mod rustc_warn { - //! See - - #[expect(dead_code)] - pub fn rustc_lints() { - let x = 42; - - #[expect(illegal_floating_point_literal_pattern)] - match x { - 5 => {} - 6 => {} - _ => {} - } - } -} - -pub mod rustdoc_ok { - //! See - - #[expect(rustdoc::broken_intra_doc_links)] - /// I want to link to [`Nonexistent`] but it doesn't exist! - pub fn foo() {} - - #[expect(rustdoc::invalid_html_tags)] - ///

- pub fn bar() {} - - #[expect(rustdoc::bare_urls)] - /// http://example.org - pub fn baz() {} -} - -pub mod rustdoc_warn { - //! See - - #[expect(rustdoc::broken_intra_doc_links)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - /// I want to link to [`bar`] but it doesn't exist! - pub fn foo() {} - - #[expect(rustdoc::invalid_html_tags)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - ///

- pub fn bar() {} - - #[expect(rustdoc::bare_urls)] - //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations] - /// - pub fn baz() {} -} - -mod clippy_ok { - //! See - - #[expect(clippy::almost_swapped)] - fn foo() { - let mut a = 0; - let mut b = 9; - a = b; - b = a; - } - - #[expect(clippy::bytes_nth)] - fn bar() { - let _ = "Hello".bytes().nth(3); - } - - #[expect(clippy::if_same_then_else)] - fn baz() { - let _ = if true { - 42 - } else { - 42 - }; - } - - #[expect(clippy::logic_bug)] - fn burger() { - let a = false; - let b = true; - - if a && b || a {} - } -} - -mod clippy_warn { - //! See - - #[expect(clippy::almost_swapped)] - fn foo() { - let mut a = 0; - let mut b = 9; - a = b; - } - - #[expect(clippy::bytes_nth)] - fn bar() { - let _ = "Hello".as_bytes().get(3); - } - - #[expect(clippy::if_same_then_else)] - fn baz() { - let _ = if true { - 33 - } else { - 42 - }; - } - - #[expect(clippy::logic_bug)] - fn burger() { - let a = false; - let b = true; - let c = false; - - if a && b || c {} - } -} - -fn main() { - rustc_warn::rustc_lints(); -} diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr b/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr deleted file mode 100644 index efc5f349f4f..00000000000 --- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr +++ /dev/null @@ -1,28 +0,0 @@ -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:16:11 - | -LL | #![expect(rustdoc::missing_crate_level_docs)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unfulfilled_lint_expectations)]` on by default - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:71:14 - | -LL | #[expect(rustdoc::broken_intra_doc_links)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:76:14 - | -LL | #[expect(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: this lint expectation is unfulfilled - --> $DIR/expect-tool-lint-rfc-2383.rs:81:14 - | -LL | #[expect(rustdoc::bare_urls)] - | ^^^^^^^^^^^^^^^^^^ - -warning: 4 warnings emitted - diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs b/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs deleted file mode 100644 index c34ea0567a9..00000000000 --- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![deny(unknown_lints)] -//~^ NOTE defined here -#![allow(rustdoc::missing_doc_code_examples)] -//~^ ERROR unknown lint -//~| ERROR unknown lint -//~| ERROR unknown lint -//~| NOTE lint is unstable -//~| NOTE lint is unstable -//~| NOTE lint is unstable -//~| NOTE see issue -//~| NOTE see issue -//~| NOTE see issue diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr deleted file mode 100644 index 326dcfe3bde..00000000000 --- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error: unknown lint: `rustdoc::missing_doc_code_examples` - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:3:1 - | -LL | #![allow(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `rustdoc::missing_doc_code_examples` lint is unstable - = note: see issue #101730 for more information - = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable -note: the lint level is defined here - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:1:9 - | -LL | #![deny(unknown_lints)] - | ^^^^^^^^^^^^^ - -error: unknown lint: `rustdoc::missing_doc_code_examples` - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:3:1 - | -LL | #![allow(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `rustdoc::missing_doc_code_examples` lint is unstable - = note: see issue #101730 for more information - = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable - -error: unknown lint: `rustdoc::missing_doc_code_examples` - --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:3:1 - | -LL | #![allow(rustdoc::missing_doc_code_examples)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `rustdoc::missing_doc_code_examples` lint is unstable - = note: see issue #101730 for more information - = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable - -error: aborting due to 3 previous errors - diff --git a/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs new file mode 100644 index 00000000000..0976515f4a4 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs @@ -0,0 +1,22 @@ +#![deny(rustdoc::broken_intra_doc_links)] + +#[derive(Debug)] +/// Link to [`S::fmt`] +//~^ ERROR unresolved link +pub struct S; + +pub mod inner { + use std::fmt::Debug; + use super::S; + + /// Link to [`S::fmt`] + pub fn f() {} +} + +pub mod ambiguous { + use std::fmt::{Display, Debug}; + use super::S; + + /// Link to [`S::fmt`] + pub fn f() {} +} diff --git a/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr new file mode 100644 index 00000000000..04594ad4142 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr @@ -0,0 +1,14 @@ +error: unresolved link to `S::fmt` + --> $DIR/assoc-item-not-in-scope.rs:4:15 + | +LL | /// Link to [`S::fmt`] + | ^^^^^^ the struct `S` has no field or associated item named `fmt` + | +note: the lint level is defined here + --> $DIR/assoc-item-not-in-scope.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/pub-export-lint.rs b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs new file mode 100644 index 00000000000..f2e66b77bf3 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs @@ -0,0 +1,5 @@ +#![deny(rustdoc::broken_intra_doc_links)] + +/// [aloha] +//~^ ERROR unresolved link to `aloha` +pub use std::task::RawWakerVTable; diff --git a/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr new file mode 100644 index 00000000000..81ef799617c --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr @@ -0,0 +1,15 @@ +error: unresolved link to `aloha` + --> $DIR/pub-export-lint.rs:3:6 + | +LL | /// [aloha] + | ^^^^^ no item named `aloha` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` +note: the lint level is defined here + --> $DIR/pub-export-lint.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs new file mode 100644 index 00000000000..71bd2c522ff --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs @@ -0,0 +1,20 @@ +#![deny(rustdoc::broken_intra_doc_links)] + +/// Links to [a] [link][a] +/// And also a [third link][a] +/// And also a [reference link][b] +/// +/// Other links to the same target should still emit error: [ref] //~ERROR unresolved link to `ref` +/// Duplicate [ref] //~ERROR unresolved link to `ref` +/// +/// Other links to other targets should still emit error: [ref2] //~ERROR unresolved link to `ref2` +/// Duplicate [ref2] //~ERROR unresolved link to `ref2` +/// +/// [a]: ref +//~^ ERROR unresolved link to `ref` +/// [b]: ref2 +//~^ ERROR unresolved link to + +/// [ref][] +//~^ ERROR unresolved link +pub fn f() {} diff --git a/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr new file mode 100644 index 00000000000..2ab67090f66 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr @@ -0,0 +1,63 @@ +error: unresolved link to `ref` + --> $DIR/reference-link-reports-error-once.rs:13:10 + | +LL | /// [a]: ref + | ^^^ no item named `ref` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` +note: the lint level is defined here + --> $DIR/reference-link-reports-error-once.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: unresolved link to `ref2` + --> $DIR/reference-link-reports-error-once.rs:15:10 + | +LL | /// [b]: ref2 + | ^^^^ no item named `ref2` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: unresolved link to `ref` + --> $DIR/reference-link-reports-error-once.rs:7:62 + | +LL | /// Other links to the same target should still emit error: [ref] + | ^^^ no item named `ref` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: unresolved link to `ref` + --> $DIR/reference-link-reports-error-once.rs:8:16 + | +LL | /// Duplicate [ref] + | ^^^ no item named `ref` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: unresolved link to `ref2` + --> $DIR/reference-link-reports-error-once.rs:10:60 + | +LL | /// Other links to other targets should still emit error: [ref2] + | ^^^^ no item named `ref2` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: unresolved link to `ref2` + --> $DIR/reference-link-reports-error-once.rs:11:16 + | +LL | /// Duplicate [ref2] + | ^^^^ no item named `ref2` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: unresolved link to `ref` + --> $DIR/reference-link-reports-error-once.rs:18:6 + | +LL | /// [ref][] + | ^^^ no item named `ref` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: aborting due to 7 previous errors + diff --git a/tests/rustdoc-ui/intra-doc/reference-links.rs b/tests/rustdoc-ui/intra-doc/reference-links.rs new file mode 100644 index 00000000000..e81e034465d --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/reference-links.rs @@ -0,0 +1,6 @@ +// Test that errors point to the reference, not to the title text. +#![deny(rustdoc::broken_intra_doc_links)] +//! Links to [a] [link][a] +//! +//! [a]: std::process::Comman +//~^ ERROR unresolved diff --git a/tests/rustdoc-ui/intra-doc/reference-links.stderr b/tests/rustdoc-ui/intra-doc/reference-links.stderr new file mode 100644 index 00000000000..c98a2fd7ce6 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/reference-links.stderr @@ -0,0 +1,14 @@ +error: unresolved link to `std::process::Comman` + --> $DIR/reference-links.rs:5:10 + | +LL | //! [a]: std::process::Comman + | ^^^^^^^^^^^^^^^^^^^^ no item named `Comman` in module `process` + | +note: the lint level is defined here + --> $DIR/reference-links.rs:2:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/invalid-doc-attr.rs b/tests/rustdoc-ui/invalid-doc-attr.rs deleted file mode 100644 index c231e43b35c..00000000000 --- a/tests/rustdoc-ui/invalid-doc-attr.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![crate_type = "lib"] -#![deny(warnings)] - -#[doc(test(no_crate_inject))] -//~^ ERROR can only be applied at the crate level -//~| WARN is being phased out -//~| HELP to apply to the crate, use an inner attribute -//~| SUGGESTION ! -#[doc(inline)] -//~^ ERROR can only be applied to a `use` item -//~| WARN is being phased out -pub fn foo() {} - -pub mod bar { - #![doc(test(no_crate_inject))] - //~^ ERROR can only be applied at the crate level - //~| WARN is being phased out - - #[doc(test(no_crate_inject))] - //~^ ERROR can only be applied at the crate level - //~| WARN is being phased out - #[doc(inline)] - //~^ ERROR can only be applied to a `use` item - //~| WARN is being phased out - pub fn baz() {} -} - -#[doc(inline)] -#[doc(no_inline)] -//~^^ ERROR conflicting doc inlining attributes -//~| HELP remove one of the conflicting attributes -pub use bar::baz; diff --git a/tests/rustdoc-ui/invalid-doc-attr.stderr b/tests/rustdoc-ui/invalid-doc-attr.stderr deleted file mode 100644 index b23b8ded867..00000000000 --- a/tests/rustdoc-ui/invalid-doc-attr.stderr +++ /dev/null @@ -1,78 +0,0 @@ -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:4:7 - | -LL | #[doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information -note: the lint level is defined here - --> $DIR/invalid-doc-attr.rs:2:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]` -help: to apply to the crate, use an inner attribute - | -LL | #![doc(test(no_crate_inject))] - | + - -error: this attribute can only be applied to a `use` item - --> $DIR/invalid-doc-attr.rs:9:7 - | -LL | #[doc(inline)] - | ^^^^^^ only applicable on `use` items -... -LL | pub fn foo() {} - | ------------ not a `use` item - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:15:12 - | -LL | #![doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: conflicting doc inlining attributes - --> $DIR/invalid-doc-attr.rs:28:7 - | -LL | #[doc(inline)] - | ^^^^^^ this attribute... -LL | #[doc(no_inline)] - | ^^^^^^^^^ ...conflicts with this attribute - | - = help: remove one of the conflicting attributes - -error: this attribute can only be applied at the crate level - --> $DIR/invalid-doc-attr.rs:19:11 - | -LL | #[doc(test(no_crate_inject))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: this attribute can only be applied to a `use` item - --> $DIR/invalid-doc-attr.rs:22:11 - | -LL | #[doc(inline)] - | ^^^^^^ only applicable on `use` items -... -LL | pub fn baz() {} - | ------------ not a `use` item - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 - = note: read for more information - -error: aborting due to 6 previous errors - diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs b/tests/rustdoc-ui/invalid-html-self-closing-tag.rs deleted file mode 100644 index d973a53cbc7..00000000000 --- a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs +++ /dev/null @@ -1,70 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct A; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct B; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct C; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct D; - -///

-pub struct G; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct H; - -///

-//~^ ERROR invalid self-closing HTML tag `p` -pub struct I; - -///
-pub struct J; - -/// -pub struct K; - -/// -pub struct L; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct M; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct N; - -/// -//~^ ERROR invalid self-closing HTML tag `a` -pub struct O; - -/// -pub struct P; - -/// -pub struct Q; - -/// -//~^ ERROR unclosed HTML tag `rect` -pub struct R; - -/// -pub struct S; diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr b/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr deleted file mode 100644 index e45edfb43ff..00000000000 --- a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr +++ /dev/null @@ -1,80 +0,0 @@ -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:3:5 - | -LL | ///

- | ^^ - | -note: the lint level is defined here - --> $DIR/invalid-html-self-closing-tag.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:7:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:11:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:15:5 - | -LL | ///

- | ^^ - -error: unclosed quoted HTML attribute on tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:19:14 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `p` - --> $DIR/invalid-html-self-closing-tag.rs:34:5 - | -LL | ///

- | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:47:5 - | -LL | /// - | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:51:5 - | -LL | /// - | ^^ - -error: invalid self-closing HTML tag `a` - --> $DIR/invalid-html-self-closing-tag.rs:55:5 - | -LL | /// - | ^^ - -error: unclosed HTML tag `rect` - --> $DIR/invalid-html-self-closing-tag.rs:65:10 - | -LL | /// - | ^^^^^ - -error: aborting due to 12 previous errors - diff --git a/tests/rustdoc-ui/invalid-html-tags.rs b/tests/rustdoc-ui/invalid-html-tags.rs deleted file mode 100644 index 317f1fd1d46..00000000000 --- a/tests/rustdoc-ui/invalid-html-tags.rs +++ /dev/null @@ -1,123 +0,0 @@ -#![deny(rustdoc::invalid_html_tags)] - -//!

💩

-//~^ ERROR unclosed HTML tag `p` -//~^^ ERROR unclosed HTML tag `p` - -/// -/// -/// -//~^ ERROR unclosed HTML tag `unknown` -/// < ok -/// -/// -pub fn d() {} - -// Unclosed tags shouldn't warn if they are nested inside a -/// -pub fn e() {} - -// Closing tags need to have ">" at the end, otherwise it's not a closing tag! -///

-///
-/// -/// -/// -pub fn g() {} - -/// -pub fn h() {} - -/// $DIR/invalid-html-tags.rs:3:5 - | -LL | //!

💩

- | ^^^ - | -note: the lint level is defined here - --> $DIR/invalid-html-tags.rs:1:9 - | -LL | #![deny(rustdoc::invalid_html_tags)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unclosed HTML tag `p` - --> $DIR/invalid-html-tags.rs:3:9 - | -LL | //!

💩

- | ^^^ - -error: unclosed HTML tag `unknown` - --> $DIR/invalid-html-tags.rs:11:5 - | -LL | /// - | ^^^^^^^^^ - -error: unclosed HTML tag `script` - --> $DIR/invalid-html-tags.rs:14:5 - | -LL | /// +/// +//~^ ERROR unclosed HTML tag `unknown` +/// < ok +/// +/// +pub fn d() {} + +// Unclosed tags shouldn't warn if they are nested inside a +/// +pub fn e() {} + +// Closing tags need to have ">" at the end, otherwise it's not a closing tag! +///

+///
+/// +/// +/// +pub fn g() {} + +/// +pub fn h() {} + +/// $DIR/invalid-html-tags.rs:3:5 + | +LL | //!

💩

+ | ^^^ + | +note: the lint level is defined here + --> $DIR/invalid-html-tags.rs:1:9 + | +LL | #![deny(rustdoc::invalid_html_tags)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: unclosed HTML tag `p` + --> $DIR/invalid-html-tags.rs:3:9 + | +LL | //!

💩

+ | ^^^ + +error: unclosed HTML tag `unknown` + --> $DIR/invalid-html-tags.rs:11:5 + | +LL | /// + | ^^^^^^^^^ + +error: unclosed HTML tag `script` + --> $DIR/invalid-html-tags.rs:14:5 + | +LL | ///