Rollup merge of #154070 - mehdiakiki:unstable-book-options-parser, r=clubby789

Unstable book options parser

Parses the `options!` macro in `compiler/rustc_session/src/options.rs` directly to extract the unstable (-Z) compiler flag names and descriptions to generate documentation for the unstable book.

I took notice from the previous attempt which ran `rustc -Zhelp` and parsed the output and used this approach that reads the source directly.

Used claude for the tedious char by char parsing parts but verified the code, I hope that's ok!
This commit is contained in:
León Orell Valerian Liehr
2026-03-27 15:11:53 +01:00
committed by GitHub
6 changed files with 865 additions and 587 deletions
+2
View File
@@ -6088,6 +6088,8 @@ name = "unstable-book-gen"
version = "0.1.0"
dependencies = [
"num-traits",
"proc-macro2",
"syn 2.0.110",
"tidy",
]