From bc1fbf55db9671be7bb04bbf5f68b48f8ee17b2e Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Fri, 5 Mar 2021 10:04:22 -0500 Subject: [PATCH] Move rustdoc UI tests into a subdirectory This also adds a little leeway to the test limit. --- src/test/ui/{ => parser}/lex-bare-cr-nondoc-comment.rs | 0 .../lexer-crlf-line-endings-string-literal-doc-comment.rs | 0 src/test/ui/rustdoc/README.md | 3 +++ src/test/ui/{ => rustdoc}/cfg-rustdoc.rs | 0 src/test/ui/{ => rustdoc}/cfg-rustdoc.stderr | 0 src/test/ui/{ => rustdoc}/check-doc-alias-attr-location.rs | 0 src/test/ui/{ => rustdoc}/check-doc-alias-attr-location.stderr | 0 src/test/ui/{ => rustdoc}/check-doc-alias-attr.rs | 0 src/test/ui/{ => rustdoc}/check-doc-alias-attr.stderr | 0 src/test/ui/{ => rustdoc}/doc-alias-crate-level.rs | 0 src/test/ui/{ => rustdoc}/doc-alias-crate-level.stderr | 0 src/test/ui/{ => rustdoc}/doc-alias-same-name.rs | 0 src/test/ui/{ => rustdoc}/doc-alias-same-name.stderr | 0 src/test/ui/{ => rustdoc}/doc_keyword.rs | 0 src/test/ui/{ => rustdoc}/doc_keyword.stderr | 0 src/test/ui/{ => rustdoc}/unterminated-doc-comment.rs | 0 src/test/ui/{ => rustdoc}/unterminated-doc-comment.stderr | 0 src/tools/tidy/src/ui_tests.rs | 2 +- 18 files changed, 4 insertions(+), 1 deletion(-) rename src/test/ui/{ => parser}/lex-bare-cr-nondoc-comment.rs (100%) rename src/test/ui/{ => parser}/lexer-crlf-line-endings-string-literal-doc-comment.rs (100%) create mode 100644 src/test/ui/rustdoc/README.md rename src/test/ui/{ => rustdoc}/cfg-rustdoc.rs (100%) rename src/test/ui/{ => rustdoc}/cfg-rustdoc.stderr (100%) rename src/test/ui/{ => rustdoc}/check-doc-alias-attr-location.rs (100%) rename src/test/ui/{ => rustdoc}/check-doc-alias-attr-location.stderr (100%) rename src/test/ui/{ => rustdoc}/check-doc-alias-attr.rs (100%) rename src/test/ui/{ => rustdoc}/check-doc-alias-attr.stderr (100%) rename src/test/ui/{ => rustdoc}/doc-alias-crate-level.rs (100%) rename src/test/ui/{ => rustdoc}/doc-alias-crate-level.stderr (100%) rename src/test/ui/{ => rustdoc}/doc-alias-same-name.rs (100%) rename src/test/ui/{ => rustdoc}/doc-alias-same-name.stderr (100%) rename src/test/ui/{ => rustdoc}/doc_keyword.rs (100%) rename src/test/ui/{ => rustdoc}/doc_keyword.stderr (100%) rename src/test/ui/{ => rustdoc}/unterminated-doc-comment.rs (100%) rename src/test/ui/{ => rustdoc}/unterminated-doc-comment.stderr (100%) diff --git a/src/test/ui/lex-bare-cr-nondoc-comment.rs b/src/test/ui/parser/lex-bare-cr-nondoc-comment.rs similarity index 100% rename from src/test/ui/lex-bare-cr-nondoc-comment.rs rename to src/test/ui/parser/lex-bare-cr-nondoc-comment.rs diff --git a/src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs b/src/test/ui/parser/lexer-crlf-line-endings-string-literal-doc-comment.rs similarity index 100% rename from src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs rename to src/test/ui/parser/lexer-crlf-line-endings-string-literal-doc-comment.rs diff --git a/src/test/ui/rustdoc/README.md b/src/test/ui/rustdoc/README.md new file mode 100644 index 0000000000000..1c98ab038ab72 --- /dev/null +++ b/src/test/ui/rustdoc/README.md @@ -0,0 +1,3 @@ +This directory is for tests that have to do with rustdoc, but test the behavior +of rustc. For example, rustc should not warn that an attribute rustdoc uses is +unknown. diff --git a/src/test/ui/cfg-rustdoc.rs b/src/test/ui/rustdoc/cfg-rustdoc.rs similarity index 100% rename from src/test/ui/cfg-rustdoc.rs rename to src/test/ui/rustdoc/cfg-rustdoc.rs diff --git a/src/test/ui/cfg-rustdoc.stderr b/src/test/ui/rustdoc/cfg-rustdoc.stderr similarity index 100% rename from src/test/ui/cfg-rustdoc.stderr rename to src/test/ui/rustdoc/cfg-rustdoc.stderr diff --git a/src/test/ui/check-doc-alias-attr-location.rs b/src/test/ui/rustdoc/check-doc-alias-attr-location.rs similarity index 100% rename from src/test/ui/check-doc-alias-attr-location.rs rename to src/test/ui/rustdoc/check-doc-alias-attr-location.rs diff --git a/src/test/ui/check-doc-alias-attr-location.stderr b/src/test/ui/rustdoc/check-doc-alias-attr-location.stderr similarity index 100% rename from src/test/ui/check-doc-alias-attr-location.stderr rename to src/test/ui/rustdoc/check-doc-alias-attr-location.stderr diff --git a/src/test/ui/check-doc-alias-attr.rs b/src/test/ui/rustdoc/check-doc-alias-attr.rs similarity index 100% rename from src/test/ui/check-doc-alias-attr.rs rename to src/test/ui/rustdoc/check-doc-alias-attr.rs diff --git a/src/test/ui/check-doc-alias-attr.stderr b/src/test/ui/rustdoc/check-doc-alias-attr.stderr similarity index 100% rename from src/test/ui/check-doc-alias-attr.stderr rename to src/test/ui/rustdoc/check-doc-alias-attr.stderr diff --git a/src/test/ui/doc-alias-crate-level.rs b/src/test/ui/rustdoc/doc-alias-crate-level.rs similarity index 100% rename from src/test/ui/doc-alias-crate-level.rs rename to src/test/ui/rustdoc/doc-alias-crate-level.rs diff --git a/src/test/ui/doc-alias-crate-level.stderr b/src/test/ui/rustdoc/doc-alias-crate-level.stderr similarity index 100% rename from src/test/ui/doc-alias-crate-level.stderr rename to src/test/ui/rustdoc/doc-alias-crate-level.stderr diff --git a/src/test/ui/doc-alias-same-name.rs b/src/test/ui/rustdoc/doc-alias-same-name.rs similarity index 100% rename from src/test/ui/doc-alias-same-name.rs rename to src/test/ui/rustdoc/doc-alias-same-name.rs diff --git a/src/test/ui/doc-alias-same-name.stderr b/src/test/ui/rustdoc/doc-alias-same-name.stderr similarity index 100% rename from src/test/ui/doc-alias-same-name.stderr rename to src/test/ui/rustdoc/doc-alias-same-name.stderr diff --git a/src/test/ui/doc_keyword.rs b/src/test/ui/rustdoc/doc_keyword.rs similarity index 100% rename from src/test/ui/doc_keyword.rs rename to src/test/ui/rustdoc/doc_keyword.rs diff --git a/src/test/ui/doc_keyword.stderr b/src/test/ui/rustdoc/doc_keyword.stderr similarity index 100% rename from src/test/ui/doc_keyword.stderr rename to src/test/ui/rustdoc/doc_keyword.stderr diff --git a/src/test/ui/unterminated-doc-comment.rs b/src/test/ui/rustdoc/unterminated-doc-comment.rs similarity index 100% rename from src/test/ui/unterminated-doc-comment.rs rename to src/test/ui/rustdoc/unterminated-doc-comment.rs diff --git a/src/test/ui/unterminated-doc-comment.stderr b/src/test/ui/rustdoc/unterminated-doc-comment.stderr similarity index 100% rename from src/test/ui/unterminated-doc-comment.stderr rename to src/test/ui/rustdoc/unterminated-doc-comment.stderr diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index c69bdca761181..3374a8c9b73fa 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -7,7 +7,7 @@ use std::path::Path; const ENTRY_LIMIT: usize = 1000; // FIXME: The following limits should be reduced eventually. -const ROOT_ENTRY_LIMIT: usize = 1418; +const ROOT_ENTRY_LIMIT: usize = 1408; const ISSUES_ENTRY_LIMIT: usize = 2565; fn check_entries(path: &Path, bad: &mut bool) {