Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unstable book #69561

Merged
merged 3 commits into from
Mar 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
@@ -63,20 +63,6 @@ pub struct CollectedFeatures {
pub fn collect_lib_features(base_src_path: &Path) -> Features {
let mut lib_features = Features::new();

// This library feature is defined in the `compiler_builtins` crate, which
// has been moved out-of-tree. Now it can no longer be auto-discovered by
// `tidy`, because we need to filter out its (submodule) directory. Manually
// add it to the set of known library features so we can still generate docs.
lib_features.insert(
"compiler_builtins_lib".to_owned(),
Feature {
level: Status::Unstable,
since: None,
has_gate_test: false,
tracking_issue: None,
},
);

map_lib_features(base_src_path, &mut |res, _, _| {
if let Ok((name, feature)) = res {
lib_features.insert(name.to_owned(), feature);
18 changes: 2 additions & 16 deletions src/tools/tidy/src/unstable_book.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::features::{CollectedFeatures, Feature, Features, Status};
use crate::features::{CollectedFeatures, Features, Status};
use std::collections::BTreeSet;
use std::fs;
use std::path::{Path, PathBuf};
@@ -73,26 +73,12 @@ fn collect_unstable_book_lib_features_section_file_names(base_src_path: &Path) -

pub fn check(path: &Path, features: CollectedFeatures, bad: &mut bool) {
let lang_features = features.lang;
let mut lib_features = features
let lib_features = features
.lib
.into_iter()
.filter(|&(ref name, _)| !lang_features.contains_key(name))
.collect::<Features>();

// This library feature is defined in the `compiler_builtins` crate, which
// has been moved out-of-tree. Now it can no longer be auto-discovered by
// `tidy`, because we need to filter out its (submodule) directory. Manually
// add it to the set of known library features so we can still generate docs.
lib_features.insert(
"compiler_builtins_lib".to_owned(),
Feature {
level: Status::Unstable,
since: None,
has_gate_test: false,
tracking_issue: None,
},
);

// Library features
let unstable_lib_feature_names = collect_unstable_feature_names(&lib_features);
let unstable_book_lib_features_section_file_names =