about summary refs log tree commit diff
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2025-10-04 15:02:43 +0800
committeryukang <moorekang@gmail.com>2025-10-04 15:18:16 +0800
commit422b91443f1016aec2a1f00316d01a117ddc7829 (patch)
treefa65ff1ff9f23c310065d5ad31ec932f632b3829
parent7950f244e7ef55b61a83d12f4662be643cd182d6 (diff)
downloadrust-422b91443f1016aec2a1f00316d01a117ddc7829.tar.gz
rust-422b91443f1016aec2a1f00316d01a117ddc7829.zip
Fix top level ui tests check in tidy
-rw-r--r--src/tools/tidy/src/ui_tests.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index 12eca47c171..c74ecf3d43f 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -81,21 +81,20 @@ fn deny_new_top_level_ui_tests(check: &mut RunningCheck, tests_path: &Path) {
     // - <https://github.com/rust-lang/rust/issues/73494>
     // - <https://github.com/rust-lang/rust/issues/133895>
 
-    let top_level_ui_tests = walkdir::WalkDir::new(tests_path)
-        .min_depth(1)
-        .max_depth(1)
+    let top_level_ui_tests = ignore::WalkBuilder::new(tests_path)
+        .max_depth(Some(1))
         .follow_links(false)
-        .same_file_system(true)
-        .into_iter()
+        .build()
         .flatten()
         .filter(|e| {
             let file_name = e.file_name();
             file_name != ".gitattributes" && file_name != "README.md"
         })
-        .filter(|e| !e.file_type().is_dir());
+        .filter(|e| !e.file_type().is_some_and(|f| f.is_dir()));
+
     for entry in top_level_ui_tests {
         check.error(format!(
-            "ui tests should be added under meaningful subdirectories: `{}`",
+            "ui tests should be added under meaningful subdirectories: `{}`, see https://github.com/rust-lang/compiler-team/issues/902",
             entry.path().display()
         ));
     }