about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-03 16:57:58 +0800
committerGitHub <noreply@github.com>2018-01-03 16:57:58 +0800
commitd6cf5a56ac96e908aa762e501e589d8a95c7d971 (patch)
treed52535e5d921e9200593e4aaa2acd39b892afbab /src
parent219e72c9085f245aca72f7d105590b6e5a089fb9 (diff)
parent5c25b0c5948d730d7fa7f6e581e8b91d4467753e (diff)
downloadrust-d6cf5a56ac96e908aa762e501e589d8a95c7d971.tar.gz
rust-d6cf5a56ac96e908aa762e501e589d8a95c7d971.zip
Rollup merge of #47117 - tinaun:no_more_dups, r=frewsxcv
[unstable book] remove duplicate entries

if a unstable feature is a language feature, it shouldn't also have a library feature stub generated
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/library-features/proc-macro.md7
-rw-r--r--src/tools/tidy/src/unstable_book.rs4
-rw-r--r--src/tools/unstable-book-gen/src/main.rs4
3 files changed, 6 insertions, 9 deletions
diff --git a/src/doc/unstable-book/src/library-features/proc-macro.md b/src/doc/unstable-book/src/library-features/proc-macro.md
deleted file mode 100644
index 19e7f663c7a..00000000000
--- a/src/doc/unstable-book/src/library-features/proc-macro.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# `proc_macro`
-
-The tracking issue for this feature is: [#38356]
-
-[#38356]: https://github.com/rust-lang/rust/issues/38356
-
-------------------------
diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs
index ff032b14ad1..a4a35a706fd 100644
--- a/src/tools/tidy/src/unstable_book.rs
+++ b/src/tools/tidy/src/unstable_book.rs
@@ -87,7 +87,9 @@ pub fn check(path: &path::Path, bad: &mut bool) {
     // Library features
 
     let lang_features = collect_lang_features(path);
-    let lib_features = collect_lib_features(path);
+    let lib_features = collect_lib_features(path).into_iter().filter(|&(ref name, _)| {
+        !lang_features.contains_key(name)
+    }).collect();
 
     let unstable_lib_feature_names = collect_unstable_feature_names(&lib_features);
     let unstable_book_lib_features_section_file_names =
diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs
index 5c2bd1e3e08..f66a18547c3 100644
--- a/src/tools/unstable-book-gen/src/main.rs
+++ b/src/tools/unstable-book-gen/src/main.rs
@@ -129,7 +129,9 @@ fn main() {
     let dest_path = Path::new(&dest_path_str).join("src");
 
     let lang_features = collect_lang_features(src_path);
-    let lib_features = collect_lib_features(src_path);
+    let lib_features = collect_lib_features(src_path).into_iter().filter(|&(ref name, _)| {
+        !lang_features.contains_key(name)
+    }).collect();
 
     let doc_src_path = src_path.join(PATH_STR);