Skip to content

Commit 34c1572

Browse files
author
Bastian Gruber
committed
Change root path for unstable-book
1 parent 280277a commit 34c1572

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/tools/tidy/src/unstable_book.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use std::fs;
33
use std::path;
44
use crate::features::{collect_lang_features, collect_lib_features, Features, Status};
55

6-
pub const PATH_STR: &str = "doc/unstable-book/src";
6+
pub const PATH_STR: &str = "doc/unstable-book";
77

8-
pub const COMPILER_FLAGS_DIR: &str = "compiler-flags";
8+
pub const COMPILER_FLAGS_DIR: &str = "src/compiler-flags";
99

10-
pub const LANG_FEATURES_DIR: &str = "language-features";
10+
pub const LANG_FEATURES_DIR: &str = "src/language-features";
1111

12-
pub const LIB_FEATURES_DIR: &str = "library-features";
12+
pub const LIB_FEATURES_DIR: &str = "src/library-features";
1313

1414
/// Builds the path to the Unstable Book source directory from the Rust 'src' directory.
1515
pub fn unstable_book_path(base_src_path: &path::Path) -> path::PathBuf {

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn set_to_summary_str(set: &BTreeSet<String>, dir: &str
5252

5353
fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Features) {
5454
let compiler_flags = collect_unstable_book_section_file_names(
55-
&path.join("compiler-flags"));
55+
&path.join("src/compiler-flags"));
5656

5757
let compiler_flags_str = set_to_summary_str(&compiler_flags,
5858
"compiler-flags");
@@ -61,11 +61,11 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur
6161
let unstable_lib_features = collect_unstable_feature_names(&lib_features);
6262

6363
let lang_features_str = set_to_summary_str(&unstable_lang_features,
64-
LANG_FEATURES_DIR);
64+
"language-features");
6565
let lib_features_str = set_to_summary_str(&unstable_lib_features,
66-
LIB_FEATURES_DIR);
66+
"library-features");
6767

68-
let mut file = t!(File::create(&path.join("SUMMARY.md")));
68+
let mut file = t!(File::create(&path.join("src/SUMMARY.md")));
6969
t!(file.write_fmt(format_args!(include_str!("SUMMARY.md"),
7070
compiler_flags = compiler_flags_str,
7171
language_features = lang_features_str,
@@ -120,7 +120,7 @@ fn main() {
120120
let src_path_str = env::args_os().skip(1).next().expect("source path required");
121121
let dest_path_str = env::args_os().skip(2).next().expect("destination path required");
122122
let src_path = Path::new(&src_path_str);
123-
let dest_path = Path::new(&dest_path_str).join("src");
123+
let dest_path = Path::new(&dest_path_str);
124124

125125
let lang_features = collect_lang_features(src_path, &mut false);
126126
let lib_features = collect_lib_features(src_path).into_iter().filter(|&(ref name, _)| {

0 commit comments

Comments
 (0)