about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-06-19 03:42:27 +0000
committerbors <bors@rust-lang.org>2017-06-19 03:42:27 +0000
commit8525eb820b2449569a7fa342ffcdd6633d4383bf (patch)
tree0d2be7bd357781cd2f00a7415ebd17554462c78d /src/tools
parent8e26c0eb38c72d628d70c0d4b0696b4a16ed04e8 (diff)
parent696085faeef883bce7201ecf5ef95e8f11ad1f77 (diff)
downloadrust-8525eb820b2449569a7fa342ffcdd6633d4383bf.tar.gz
rust-8525eb820b2449569a7fa342ffcdd6633d4383bf.zip
Auto merge of #42722 - est31:master, r=Mark-Simulacrum
Remove SUMMARY.md of the unstable book as its autogenerated

Its being autogenerated now, as of PR #42612.
It seems I forgot to remove it.

Also, sort the entries of SUMMARY.md alphabetically.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tidy/src/unstable_book.rs10
-rw-r--r--src/tools/unstable-book-gen/src/main.rs18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs
index c8bfe42aa03..ff032b14ad1 100644
--- a/src/tools/tidy/src/unstable_book.rs
+++ b/src/tools/tidy/src/unstable_book.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::collections::HashSet;
+use std::collections::BTreeSet;
 use std::fs;
 use std::path;
 use features::{collect_lang_features, collect_lib_features, Features, Status};
@@ -45,7 +45,7 @@ fn dir_entry_is_file(dir_entry: &fs::DirEntry) -> bool {
 }
 
 /// Retrieve names of all unstable features
-pub fn collect_unstable_feature_names(features: &Features) -> HashSet<String> {
+pub fn collect_unstable_feature_names(features: &Features) -> BTreeSet<String> {
     features
         .iter()
         .filter(|&(_, ref f)| f.level == Status::Unstable)
@@ -53,7 +53,7 @@ pub fn collect_unstable_feature_names(features: &Features) -> HashSet<String> {
         .collect()
 }
 
-pub fn collect_unstable_book_section_file_names(dir: &path::Path) -> HashSet<String> {
+pub fn collect_unstable_book_section_file_names(dir: &path::Path) -> BTreeSet<String> {
     fs::read_dir(dir)
         .expect("could not read directory")
         .into_iter()
@@ -69,7 +69,7 @@ pub fn collect_unstable_book_section_file_names(dir: &path::Path) -> HashSet<Str
 /// * hyphens replaced by underscores
 /// * the markdown suffix ('.md') removed
 fn collect_unstable_book_lang_features_section_file_names(base_src_path: &path::Path)
-                                                          -> HashSet<String> {
+                                                          -> BTreeSet<String> {
     collect_unstable_book_section_file_names(&unstable_book_lang_features_path(base_src_path))
 }
 
@@ -78,7 +78,7 @@ fn collect_unstable_book_lang_features_section_file_names(base_src_path: &path::
 /// * hyphens replaced by underscores
 /// * the markdown suffix ('.md') removed
 fn collect_unstable_book_lib_features_section_file_names(base_src_path: &path::Path)
-                                                         -> HashSet<String> {
+                                                         -> BTreeSet<String> {
     collect_unstable_book_section_file_names(&unstable_book_lib_features_path(base_src_path))
 }
 
diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs
index 71063968ff2..5c2bd1e3e08 100644
--- a/src/tools/unstable-book-gen/src/main.rs
+++ b/src/tools/unstable-book-gen/src/main.rs
@@ -17,7 +17,7 @@ extern crate tidy;
 use tidy::features::{Feature, Features, collect_lib_features, collect_lang_features};
 use tidy::unstable_book::{collect_unstable_feature_names, collect_unstable_book_section_file_names,
                           PATH_STR, LANG_FEATURES_DIR, LIB_FEATURES_DIR};
-use std::collections::HashSet;
+use std::collections::BTreeSet;
 use std::io::Write;
 use std::fs::{self, File};
 use std::env;
@@ -48,9 +48,9 @@ fn generate_stub_no_issue(path: &Path, name: &str) {
                                    name = name)));
 }
 
-fn hset_to_summary_str(hset: HashSet<String>, dir: &str
+fn set_to_summary_str(set: &BTreeSet<String>, dir: &str
 ) -> String {
-    hset
+    set
         .iter()
         .map(|ref n| format!("    - [{}]({}/{}.md)",
                                       n,
@@ -63,16 +63,16 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur
     let compiler_flags = collect_unstable_book_section_file_names(
         &path.join("compiler-flags"));
 
-    let compiler_flags_str = hset_to_summary_str(compiler_flags,
-                                                 "compiler-flags");
+    let compiler_flags_str = set_to_summary_str(&compiler_flags,
+                                                "compiler-flags");
 
     let unstable_lang_features = collect_unstable_feature_names(&lang_features);
     let unstable_lib_features = collect_unstable_feature_names(&lib_features);
 
-    let lang_features_str = hset_to_summary_str(unstable_lang_features,
-                                                LANG_FEATURES_DIR);
-    let lib_features_str = hset_to_summary_str(unstable_lib_features,
-                                               LIB_FEATURES_DIR);
+    let lang_features_str = set_to_summary_str(&unstable_lang_features,
+                                               LANG_FEATURES_DIR);
+    let lib_features_str = set_to_summary_str(&unstable_lib_features,
+                                              LIB_FEATURES_DIR);
 
     let mut file = t!(File::create(&path.join("SUMMARY.md")));
     t!(file.write_fmt(format_args!(include_str!("SUMMARY.md"),