about summary refs log tree commit diff
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-04-26 01:55:52 -0500
committerGitHub <noreply@github.com>2023-04-26 01:55:52 -0500
commit62b5beaf93767fada13be9b08243dbb65ebf67ed (patch)
treea5575325940dd8918a27ed1f4c4cea4ff65698eb
parent3fbaf789bdc59ee491eb20fe7b40ea66cf6cc3ad (diff)
parent27c0d92f1d1847dcf626bd2865fc29b1f931d147 (diff)
downloadrust-62b5beaf93767fada13be9b08243dbb65ebf67ed.tar.gz
rust-62b5beaf93767fada13be9b08243dbb65ebf67ed.zip
Rollup merge of #110594 - infdahai:cfg_chore, r=jyn514
`rustc --help` add `--cfg` SPEC declaration.

1. fixes #110462
2. add spec arguments based on https://doc.rust-lang.org/reference/conditional-compilation.html
-rw-r--r--compiler/rustc_session/src/config.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 79eb31bb105..51418c01eed 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1400,7 +1400,8 @@ The default is {DEFAULT_EDITION} and the latest stable edition is {LATEST_STABLE
 pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
     vec![
         opt::flag_s("h", "help", "Display this message"),
-        opt::multi_s("", "cfg", "Configure the compilation environment", "SPEC"),
+        opt::multi_s("", "cfg", "Configure the compilation environment.
+                             SPEC supports the syntax `NAME[=\"VALUE\"]`.", "SPEC"),
         opt::multi("", "check-cfg", "Provide list of valid cfg options for checking", "SPEC"),
         opt::multi_s(
             "L",