about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-23 00:06:32 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-08-23 01:41:54 +0200
commit3cfb6bc73a429a67f87c6542de2b8f9395cf4b94 (patch)
treed0ec7b7ffa6aba5dc49603266cee88790018ce36
parent6febb75ec8e0aeade9be97a1224bd6327b531524 (diff)
downloadrust-3cfb6bc73a429a67f87c6542de2b8f9395cf4b94.tar.gz
rust-3cfb6bc73a429a67f87c6542de2b8f9395cf4b94.zip
Fix `tidy` fallout due to `feature_gate.rs` refactoring.
-rw-r--r--src/tools/tidy/src/features.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 88a469ef955..468e5600101 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -221,7 +221,14 @@ fn test_filen_gate(filen_underscore: &str, features: &mut Features) -> bool {
 }
 
 pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
-    let contents = t!(fs::read_to_string(base_src_path.join("libsyntax/feature_gate.rs")));
+    let mut all = collect_lang_features_in(base_src_path, "active.rs", bad);
+    all.extend(collect_lang_features_in(base_src_path, "accepted.rs", bad));
+    all.extend(collect_lang_features_in(base_src_path, "removed.rs", bad));
+    all
+}
+
+fn collect_lang_features_in(base: &Path, file: &str, bad: &mut bool) -> Features {
+    let contents = t!(fs::read_to_string(base.join("libsyntax/feature_gate").join(file)));
 
     // We allow rustc-internal features to omit a tracking issue.
     // To make tidy accept omitting a tracking issue, group the list of features