Skip to content

Commit 24a1081

Browse files
authored
Rollup merge of #81401 - ehuss:tidy-cleanup, r=Mark-Simulacrum
tidy: Some code cleanup. This is just some cleanup that shouldn't have any change in behavior. (See commit messages for more details.) * Remove cargo check. This test wasn't working, and is no longer valid. * Remove edition filter exceptions. They are no longer necessary. * Remove unnecessary trailing semicolon. Otherwise the warning will prevent tidy from building after the beta branch.
2 parents 9da3608 + 6f22f51 commit 24a1081

File tree

5 files changed

+2
-111
lines changed

5 files changed

+2
-111
lines changed

src/tools/tidy/src/cargo.rs

-90
This file was deleted.

src/tools/tidy/src/edition.rs

+1-15
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
33
use std::path::Path;
44

5-
fn filter_dirs(path: &Path) -> bool {
6-
// FIXME: just use super::filter_dirs after the submodules are updated.
7-
if super::filter_dirs(path) {
8-
return true;
9-
}
10-
let skip = [
11-
"src/doc/book/second-edition",
12-
"src/doc/book/2018-edition",
13-
"src/doc/book/ci/stable-check",
14-
"src/doc/reference/stable-check",
15-
];
16-
skip.iter().any(|p| path.ends_with(p))
17-
}
18-
195
fn is_edition_2018(mut line: &str) -> bool {
206
line = line.trim();
217
line == "edition = \"2018\"" || line == "edition = \'2018\'"
@@ -24,7 +10,7 @@ fn is_edition_2018(mut line: &str) -> bool {
2410
pub fn check(path: &Path, bad: &mut bool) {
2511
super::walk(
2612
path,
27-
&mut |path| filter_dirs(path) || path.ends_with("src/test"),
13+
&mut |path| super::filter_dirs(path) || path.ends_with("src/test"),
2814
&mut |entry, contents| {
2915
let file = entry.path();
3016
let filename = file.file_name().unwrap();

src/tools/tidy/src/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn map_lib_features(
422422
mf(Err($msg), file, i + 1);
423423
continue;
424424
}};
425-
};
425+
}
426426
if let Some((ref name, ref mut f)) = becoming_feature {
427427
if f.tracking_issue.is_none() {
428428
f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none);

src/tools/tidy/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ macro_rules! tidy_error {
4040
}
4141

4242
pub mod bins;
43-
pub mod cargo;
4443
pub mod debug_artifacts;
4544
pub mod deps;
4645
pub mod edition;

src/tools/tidy/src/main.rs

-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ fn main() {
4949
style::check(&compiler_path, &mut bad);
5050
style::check(&library_path, &mut bad);
5151

52-
cargo::check(&src_path, &mut bad);
53-
cargo::check(&compiler_path, &mut bad);
54-
cargo::check(&library_path, &mut bad);
55-
5652
edition::check(&src_path, &mut bad);
5753
edition::check(&compiler_path, &mut bad);
5854
edition::check(&library_path, &mut bad);

0 commit comments

Comments
 (0)