Change:
Running on my checkout with the current master commit fails with tons of errors. here's the last few screens of messages:
Is the check looking for in the full path? My rustc checkout is in a directory called (it's my 2nd of 3 checkouts), and I suspect tidy gets confused by that.
It does CC
That code should probably use .
Oops, I will try to fix this ASAP
Submitted a fix for this at .

Discussion:
} }); <del> let Some((test_name, _)) = test.to_str().map(|s| s.split_once('.')).flatten() else { </del> <ins> let Some(test_name) = test.file_stem().map(OsStr::to_str).flatten() else { </ins> continue; }; <ins> assert!( !test_name.contains('.'), "test name cannot contain dots '.': `{}`", test.display() ); </ins> test_info.insert(test_name.to_string(), (test, expected_revisions)); }

for sibling in files_under_inspection.iter().filter(|f| { f.extension().map(OsStr::to_str).flatten().is_some_and(|ext| EXTENSIONS.contains(&ext)) }) { <del> let filename_components = sibling.to_str().unwrap().split('.').collect::<Vec<_>>(); let file_prefix = filename_components[0]; </del> <ins> let Some(filename) = sibling.file_name().map(OsStr::to_str).flatten() else { continue; }; let filename_components = filename.split('.').collect::<Vec<_>>(); let [file_prefix, ..] = &filename_components[..] else { continue; }; </ins> <del> let Some((test_path, expected_revisions)) = test_info.get(file_prefix) else { </del> <ins> let Some((test_path, expected_revisions)) = test_info.get(*file_prefix) else { </ins> continue; }; <del> match filename_components[..] { </del> <ins> match &filename_components[..] { </ins> // Cannot have a revision component, skip. [] | [_] => return, [_, _] if !expected_revisions.is_empty() => {

[_, _] => return, [_, found_revision, .., extension] => { if !IGNORES.contains(&found_revision) <del> && !expected_revisions.contains(found_revision) </del> <ins> && !expected_revisions.contains(*found_revision) </ins> // This is from `//@ stderr-per-bitwidth` <del> && !(extension == "stderr" && ["32bit", "64bit"].contains(&found_revision)) </del> <ins> && !(*extension == "stderr" && ["32bit", "64bit"].contains(&found_revision)) </ins> { // Found some unexpected revision-esque component that is not a known // compare-mode or expected revision.

<ins> //@ compile-flags: --crate-name foo pub fn foo() {} </ins>

<del> //@ compile-flags: --crate-name foo pub fn foo() {} </del>

<ins> // issue: 113981 pub fn main() {} </ins>

<ins> error: invalid character `'$'` in crate name: `need_crate_arg_ignore_tidy$x` | = help: you can either pass `--crate-name` on the command line or add `#![crate_name="…"]` to set the crate name error: aborting due to 1 previous error </ins>

<del> // issue: 113981 pub fn main() {} </del>

<del> error: invalid character `'.'` in crate name: `need_crate_arg_ignore_tidy.x` | = help: you can either pass `--crate-name` on the command line or add `#![crate_name="…"]` to set the crate name error: aborting due to 1 previous error </del>

<ins> // Regression test for <https://github.com/rust-lang/rust/issues/121986>. // Check that `tests_revision_unpaired_stdout_stderr` don't accidentally get confused by // paths containing periods. //@ check-pass fn main() {} </ins>