From 999b9069dd1062efa46d893c0024955d499f8cd8 Mon Sep 17 00:00:00 2001 From: xizheyin Date: Fri, 25 Apr 2025 19:37:42 +0800 Subject: [PATCH] Add option style comment for `rustc_optgroups` Signed-off-by: xizheyin --- compiler/rustc_session/src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index c06f3c97da76..cc506b0164ee 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1665,6 +1665,13 @@ static EMIT_HELP: LazyLock = LazyLock::new(|| { /// Returns all rustc command line options, including metadata for /// each option, such as whether the option is stable. +/// +/// # Option style guidelines +/// +/// - ``: Indicates a required parameter +/// - `[param]`: Indicates an optional parameter +/// - `|`: Indicates a mutually exclusive option +/// - `*`: a list element with description pub fn rustc_optgroups() -> Vec { use OptionKind::{Flag, FlagMulti, Multi, Opt}; use OptionStability::{Stable, Unstable};