Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Collect library features from library/
  • Loading branch information
Mark-Simulacrum authored and mark-i-m committed Jul 28, 2020
1 parent 856f68f commit 6726ca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/doc.rs
Expand Up @@ -693,6 +693,7 @@ impl Step for UnstableBookGen {
builder.create_dir(&out);
builder.remove_dir(&out);
let mut cmd = builder.tool_cmd(Tool::UnstableBookGen);
cmd.arg(builder.src.join("library"));
cmd.arg(builder.src.join("src"));
cmd.arg(out);

Expand Down
8 changes: 5 additions & 3 deletions src/tools/unstable-book-gen/src/main.rs
Expand Up @@ -94,13 +94,15 @@ fn copy_recursive(from: &Path, to: &Path) {
}

fn main() {
let src_path_str = env::args_os().skip(1).next().expect("source path required");
let dest_path_str = env::args_os().skip(2).next().expect("destination path required");
let library_path_str = env::args_os().skip(1).next().expect("library path required");
let src_path_str = env::args_os().skip(2).next().expect("source path required");
let dest_path_str = env::args_os().skip(3).next().expect("destination path required");
let library_path = Path::new(&library_path_str);
let src_path = Path::new(&src_path_str);
let dest_path = Path::new(&dest_path_str);

let lang_features = collect_lang_features(src_path, &mut false);
let lib_features = collect_lib_features(src_path)
let lib_features = collect_lib_features(library_path)
.into_iter()
.filter(|&(ref name, _)| !lang_features.contains_key(name))
.collect();
Expand Down

0 comments on commit 6726ca2

Please sign in to comment.