Skip to content

Commit c4df3f9

Browse files
authored
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
2 parents 3251e70 + 5c25b0c commit c4df3f9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/doc/unstable-book/src/library-features/proc-macro.md

-7
This file was deleted.

src/tools/tidy/src/unstable_book.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ pub fn check(path: &path::Path, bad: &mut bool) {
8787
// Library features
8888

8989
let lang_features = collect_lang_features(path);
90-
let lib_features = collect_lib_features(path);
90+
let lib_features = collect_lib_features(path).into_iter().filter(|&(ref name, _)| {
91+
!lang_features.contains_key(name)
92+
}).collect();
9193

9294
let unstable_lib_feature_names = collect_unstable_feature_names(&lib_features);
9395
let unstable_book_lib_features_section_file_names =

src/tools/unstable-book-gen/src/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ fn main() {
129129
let dest_path = Path::new(&dest_path_str).join("src");
130130

131131
let lang_features = collect_lang_features(src_path);
132-
let lib_features = collect_lib_features(src_path);
132+
let lib_features = collect_lib_features(src_path).into_iter().filter(|&(ref name, _)| {
133+
!lang_features.contains_key(name)
134+
}).collect();
133135

134136
let doc_src_path = src_path.join(PATH_STR);
135137

0 commit comments

Comments
 (0)