From af39c0c57cb23678daaeb75ea729edd71aba14b8 Mon Sep 17 00:00:00 2001 From: xizheyin Date: Thu, 10 Jul 2025 14:17:10 +0800 Subject: Emit warning when there is no space between `-o` and confusing arg Signed-off-by: xizheyin --- compiler/rustc_session/src/config.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 4627c2978fc..7f2f5f1c5a4 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1653,6 +1653,11 @@ impl RustcOptGroup { OptionKind::FlagMulti => options.optflagmulti(short_name, long_name, desc), }; } + + /// This is for diagnostics-only. + pub fn long_name(&self) -> &str { + self.long_name + } } pub fn make_opt( -- cgit 1.4.1-3-g733a5