rust/compiler
Matthias Krüger 88acd493f9
Rollup merge of #132754 - Zalathar:opts, r=GuillaumeGomez,jieyouxu
Simplify the internal API for declaring command-line options

The internal APIs for declaring command-line options are old, and intimidatingly complex. This PR replaces them with a single function that takes explicit `stability` and `kind` arguments, making it easier to see how each option is handled, and whether it is treated as stable or unstable.

We also don't appear to have any tests for the output of `rustc --help` and similar, so I've added a run-make test to verify that this PR doesn't change any output. (There is already a similar run-make test for rustdoc's help output.)

---

The librustdoc changes are simply adjusting to updated compiler APIs; no functional change intended.

---

A side-effect of these changes is that rustfmt can once again format the entirety of these option declaration lists, which it was not doing before.
2024-11-09 19:16:44 +01:00
..
rustc
rustc_abi
rustc_arena
rustc_ast
rustc_ast_ir
rustc_ast_lowering
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck
rustc_builtin_macros
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm
rustc_codegen_ssa
rustc_const_eval
rustc_data_structures
rustc_driver
rustc_driver_impl
rustc_error_codes
rustc_error_messages
rustc_errors
rustc_expand
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir
rustc_hir_analysis
rustc_hir_pretty
rustc_hir_typeck
rustc_incremental
rustc_index
rustc_index_macros
rustc_infer
rustc_interface
rustc_lexer
rustc_lint
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros
rustc_metadata
rustc_middle
rustc_mir_build
rustc_mir_dataflow
rustc_mir_transform
rustc_monomorphize
rustc_next_trait_solver
rustc_parse Rollup merge of #132363 - compiler-errors:raw-lt-id-valid, r=wesleywiser 2024-11-09 19:16:43 +01:00
rustc_parse_format
rustc_passes
rustc_pattern_analysis
rustc_privacy
rustc_query_impl
rustc_query_system
rustc_resolve
rustc_sanitizers
rustc_serialize
rustc_session Rollup merge of #132754 - Zalathar:opts, r=GuillaumeGomez,jieyouxu 2024-11-09 19:16:44 +01:00
rustc_smir
rustc_span
rustc_symbol_mangling
rustc_target
rustc_trait_selection
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir
rustc_type_ir_macros
stable_mir