Skip to content

Commit 253e698

Browse files
committed
add "Compiler environment variables" section to the unstable book
1 parent 4de3f89 commit 253e698

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Compiler environment variables

src/tools/unstable-book-gen/src/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[The Unstable Book](the-unstable-book.md)
22

3+
- [Compiler environment variables](compiler-environment-variables.md)
4+
{compiler_env_vars}
35
- [Compiler flags](compiler-flags.md)
46
{compiler_flags}
57
- [Language features](language-features.md)

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ fn set_to_summary_str(set: &BTreeSet<String>, dir: &str) -> String {
3030

3131
fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Features) {
3232
let compiler_flags = collect_unstable_book_section_file_names(&path.join("src/compiler-flags"));
33+
let compiler_env_vars =
34+
collect_unstable_book_section_file_names(&path.join("src/compiler-environment-variables"));
3335

3436
let compiler_flags_str = set_to_summary_str(&compiler_flags, "compiler-flags");
37+
let compiler_env_vars_str =
38+
set_to_summary_str(&compiler_env_vars, "compiler-environment-variables");
3539

3640
let unstable_lang_features = collect_unstable_feature_names(&lang_features);
3741
let unstable_lib_features = collect_unstable_feature_names(&lib_features);
@@ -42,6 +46,7 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur
4246
let summary_path = path.join("src/SUMMARY.md");
4347
let content = format!(
4448
include_str!("SUMMARY.md"),
49+
compiler_env_vars = compiler_env_vars_str,
4550
compiler_flags = compiler_flags_str,
4651
language_features = lang_features_str,
4752
library_features = lib_features_str

0 commit comments

Comments
 (0)