We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e3caa2 commit fd85de1Copy full SHA for fd85de1
src/tools/tidy/src/libcoretest.rs
@@ -22,12 +22,15 @@ pub fn check(path: &Path, bad: &mut bool) {
22
&libcore_path,
23
&mut |subpath| t!(subpath.strip_prefix(&libcore_path)).starts_with("tests"),
24
&mut |subpath| {
25
- if t!(read_to_string(subpath)).contains("#[test]") {
26
- tidy_error!(
27
- bad,
28
- "{} contains #[test]; libcore tests must be placed inside `src/libcore/tests/`",
29
- subpath.display()
30
- );
+ if subpath.ends_with(".rs") {
+ if t!(read_to_string(subpath)).contains("#[test]") {
+ tidy_error!(
+ bad,
+ "{} contains #[test]; libcore tests must be placed inside \
+ `src/libcore/tests/`",
31
+ subpath.display()
32
+ );
33
+ }
34
}
35
},
36
);
0 commit comments