about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-05-19 20:56:46 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-05-21 15:16:06 -0700
commitd0b45a951bddc4ed46cbbaff15818065795d0c2b (patch)
tree926f1350980ac9ecd7a70b227cf75ff4a236b46f
parent39e02f1bd1e53d009da382654139f7c0639172a8 (diff)
downloadrust-d0b45a951bddc4ed46cbbaff15818065795d0c2b.tar.gz
rust-d0b45a951bddc4ed46cbbaff15818065795d0c2b.zip
tidy: stop special-casing tests/ui entry limit
-rw-r--r--src/tools/tidy/src/ui_tests.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index e1c6c9a2dac..37324639edf 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -16,7 +16,6 @@ const ENTRY_LIMIT: usize = 900;
 // FIXME: The following limits should be reduced eventually.
 
 const ISSUES_ENTRY_LIMIT: usize = 1676;
-const ROOT_ENTRY_LIMIT: usize = 757;
 
 const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
     "rs",     // test source files
@@ -63,14 +62,10 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
         }
     }
 
-    let (mut max, mut max_root, mut max_issues) = (0usize, 0usize, 0usize);
+    let (mut max, mut max_issues) = (0usize, 0usize);
     for (dir_path, count) in directories {
-        // Use special values for these dirs.
-        let is_root = tests_path.join("ui") == dir_path;
         let is_issues_dir = tests_path.join("ui/issues") == dir_path;
-        let (limit, maxcnt) = if is_root {
-            (ROOT_ENTRY_LIMIT, &mut max_root)
-        } else if is_issues_dir {
+        let (limit, maxcnt) = if is_issues_dir {
             (ISSUES_ENTRY_LIMIT, &mut max_issues)
         } else {
             (ENTRY_LIMIT, &mut max)
@@ -87,12 +82,6 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
             );
         }
     }
-    if ROOT_ENTRY_LIMIT > max_root {
-        tidy_error!(
-            bad,
-            "`ROOT_ENTRY_LIMIT` is too high (is {ROOT_ENTRY_LIMIT}, should be {max_root})"
-        );
-    }
     if ISSUES_ENTRY_LIMIT > max_issues {
         tidy_error!(
             bad,