diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-05-27 01:29:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-27 01:29:21 +0800 |
| commit | d5a26c5660f6f62d4ea3c05c74bbc4dd30898224 (patch) | |
| tree | a6720fc635464e53354a80fd947caea6d4acd9d1 /src/tools | |
| parent | 408dc51f9798241da1e5d95b3add232e8b5b54b6 (diff) | |
| parent | 231e8cb34e6a2c549ffd1f0c69ff2521b0ccc3e9 (diff) | |
| download | rust-d5a26c5660f6f62d4ea3c05c74bbc4dd30898224.tar.gz rust-d5a26c5660f6f62d4ea3c05c74bbc4dd30898224.zip | |
Rollup merge of #141526 - jyn514:env-vars, r=petrochenkov
add a dedicated section for compiler environment variables in the unstable book rendered:  fixes https://github.com/rust-lang/rust/issues/141523
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/unstable-book-gen/src/SUMMARY.md | 2 | ||||
| -rw-r--r-- | src/tools/unstable-book-gen/src/main.rs | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/unstable-book-gen/src/SUMMARY.md b/src/tools/unstable-book-gen/src/SUMMARY.md index 933c928e2f0..fd4ea1dada6 100644 --- a/src/tools/unstable-book-gen/src/SUMMARY.md +++ b/src/tools/unstable-book-gen/src/SUMMARY.md @@ -1,5 +1,7 @@ [The Unstable Book](the-unstable-book.md) +- [Compiler environment variables](compiler-environment-variables.md) +{compiler_env_vars} - [Compiler flags](compiler-flags.md) {compiler_flags} - [Language features](language-features.md) diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs index 33435772960..159a1d0fa17 100644 --- a/src/tools/unstable-book-gen/src/main.rs +++ b/src/tools/unstable-book-gen/src/main.rs @@ -35,8 +35,12 @@ fn set_to_summary_str(set: &BTreeSet<String>, dir: &str) -> String { fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Features) { let compiler_flags = collect_unstable_book_section_file_names(&path.join("src/compiler-flags")); + let compiler_env_vars = + collect_unstable_book_section_file_names(&path.join("src/compiler-environment-variables")); let compiler_flags_str = set_to_summary_str(&compiler_flags, "compiler-flags"); + let compiler_env_vars_str = + set_to_summary_str(&compiler_env_vars, "compiler-environment-variables"); let unstable_lang_features = collect_unstable_feature_names(&lang_features); let unstable_lib_features = collect_unstable_feature_names(&lib_features); @@ -47,6 +51,7 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur let summary_path = path.join("src/SUMMARY.md"); let content = format!( include_str!("SUMMARY.md"), + compiler_env_vars = compiler_env_vars_str, compiler_flags = compiler_flags_str, language_features = lang_features_str, library_features = lib_features_str |
