From 46cd4103818c573ca0ca9cf450ae1a006dca27bf Mon Sep 17 00:00:00 2001 From: tinaun Date: Fri, 13 Oct 2017 02:00:45 -0400 Subject: [PATCH 1/5] remove duplicate stubs --- src/doc/unstable-book/src/library-features/proc-macro.md | 7 ------- src/tools/tidy/src/unstable_book.rs | 4 +++- src/tools/unstable-book-gen/src/main.rs | 6 +++++- 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 src/doc/unstable-book/src/library-features/proc-macro.md 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 19e7f663c7ac3..0000000000000 --- 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 ff032b14ad1d5..e8eac0b87033a 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).iter().filter(|(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 5c2bd1e3e087d..189f69ab7cb63 100644 --- a/src/tools/unstable-book-gen/src/main.rs +++ b/src/tools/unstable-book-gen/src/main.rs @@ -129,7 +129,11 @@ 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) + .iter() + .filter(|(name, _) { + !lang_features.contains_key(name) + }).collect(); let doc_src_path = src_path.join(PATH_STR); From d7cdd56df49436f59cecd08fef8d8114db7cb76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= Date: Mon, 1 Jan 2018 14:03:49 +0700 Subject: [PATCH 2/5] memchr: fix variable name in docstrings --- src/libcore/slice/memchr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/slice/memchr.rs b/src/libcore/slice/memchr.rs index 00183be97e751..69c9cb37dcfd3 100644 --- a/src/libcore/slice/memchr.rs +++ b/src/libcore/slice/memchr.rs @@ -56,7 +56,7 @@ fn repeat_byte(b: u8) -> usize { rep } -/// Return the first index matching the byte `a` in `text`. +/// Return the first index matching the byte `x` in `text`. pub fn memchr(x: u8, text: &[u8]) -> Option { // Scan for a single byte value by reading two `usize` words at a time. // @@ -101,7 +101,7 @@ pub fn memchr(x: u8, text: &[u8]) -> Option { text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i) } -/// Return the last index matching the byte `a` in `text`. +/// Return the last index matching the byte `x` in `text`. pub fn memrchr(x: u8, text: &[u8]) -> Option { // Scan for a single byte value by reading two `usize` words at a time. // From 05cbe6d7db043c18b99a306ace7bbf3ff59c82e8 Mon Sep 17 00:00:00 2001 From: Who? Me?! Date: Mon, 1 Jan 2018 13:17:25 -0600 Subject: [PATCH 3/5] Fix typo --- src/librustc/mir/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/mir/README.md b/src/librustc/mir/README.md index fb0c7ce1df23d..cac86be0fcb75 100644 --- a/src/librustc/mir/README.md +++ b/src/librustc/mir/README.md @@ -59,7 +59,7 @@ ensure that, before the MIR at a particular phase in the processing pipeline is stolen, anyone who may want to read from it has already done so. Concretely, this means that if you have some query `foo(D)` that wants to access the result of `mir_const(D)` or -`mir_validated(D)`, you need to have the successor pass either "force" +`mir_validated(D)`, you need to have the successor pass "force" `foo(D)` using `ty::queries::foo::force(...)`. This will force a query to execute even though you don't directly require its result. From 5c25b0c5948d730d7fa7f6e581e8b91d4467753e Mon Sep 17 00:00:00 2001 From: tinaun Date: Mon, 1 Jan 2018 19:32:44 -0500 Subject: [PATCH 4/5] prevent generating duplicate stubs --- src/tools/tidy/src/unstable_book.rs | 2 +- src/tools/unstable-book-gen/src/main.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs index e8eac0b87033a..a4a35a706fd91 100644 --- a/src/tools/tidy/src/unstable_book.rs +++ b/src/tools/tidy/src/unstable_book.rs @@ -87,7 +87,7 @@ 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).iter().filter(|(name, _) { + let lib_features = collect_lib_features(path).into_iter().filter(|&(ref name, _)| { !lang_features.contains_key(name) }).collect(); diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs index 189f69ab7cb63..f66a18547c3b5 100644 --- a/src/tools/unstable-book-gen/src/main.rs +++ b/src/tools/unstable-book-gen/src/main.rs @@ -129,11 +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) - .iter() - .filter(|(name, _) { - !lang_features.contains_key(name) - }).collect(); + 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); From 301e457989ea80926a98f3279dc2e42da47e466d Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 1 Jan 2018 19:06:59 -0800 Subject: [PATCH 5/5] Fix panic condition docs for Vec::insert. Fixes https://github.com/rust-lang/rust/issues/47065. --- src/liballoc/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 93d7e66b7b203..301e44632b823 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -715,7 +715,7 @@ impl Vec { /// /// # Panics /// - /// Panics if `index` is out of bounds. + /// Panics if `index > len`. /// /// # Examples ///