about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-01-12 15:16:58 +0100
committerGitHub <noreply@github.com>2024-01-12 15:16:58 +0100
commitc997b29a3a292baa2735ec3f9439669752cbcfd7 (patch)
tree223d9b4ce6c976f327061e4e4dba6dd8b432c04f /compiler/rustc_session/src
parent4d12817716d2d70a903866cbd8f557ef489574e3 (diff)
parent462bcac629752d4f5d8bf87adcba9dab96044ed5 (diff)
downloadrust-c997b29a3a292baa2735ec3f9439669752cbcfd7.tar.gz
rust-c997b29a3a292baa2735ec3f9439669752cbcfd7.zip
Rollup merge of #119884 - GuillaumeGomez:rename-env-opt, r=davidtwco
Rename `--env` option flag to `--env-set`

As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Stabilizing.20.60--env.60.20option.20flag.3F). We rename `--env` to not conflicting names with the [RFC](https://github.com/rust-lang/rfcs/pull/2794).

r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 8918dce7d3a..20bea153793 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1824,7 +1824,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
             "Remap source names in all output (compiler messages and output files)",
             "FROM=TO",
         ),
-        opt::multi("", "env", "Inject an environment variable", "VAR=VALUE"),
+        opt::multi("", "env-set", "Inject an environment variable", "VAR=VALUE"),
     ]);
     opts
 }
@@ -2600,11 +2600,11 @@ fn parse_logical_env(
 ) -> FxIndexMap<String, String> {
     let mut vars = FxIndexMap::default();
 
-    for arg in matches.opt_strs("env") {
+    for arg in matches.opt_strs("env-set") {
         if let Some((name, val)) = arg.split_once('=') {
             vars.insert(name.to_string(), val.to_string());
         } else {
-            early_dcx.early_fatal(format!("`--env`: specify value for variable `{arg}`"));
+            early_dcx.early_fatal(format!("`--env-set`: specify value for variable `{arg}`"));
         }
     }