You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tracking issue for this feature is: [#118372](https://github.com/rust-lang/rust/issues/118372).
4
+
5
+
------------------------
6
+
7
+
This option flag allows to specify environment variables value at compile time to be
8
+
used by `env!` and `option_env!` macros.
9
+
10
+
When retrieving an environment variable value, the one specified by `--env` will take
11
+
precedence. For example, if you want have `PATH=a` in your environment and pass:
12
+
13
+
```bash
14
+
rustc --env PATH=env
15
+
```
16
+
17
+
Then you will have:
18
+
19
+
```rust,no_run
20
+
assert_eq!(env!("PATH"), "env");
21
+
```
22
+
23
+
Please note that on Windows, environment variables are case insensitive but case
24
+
preserving whereas `rustc`'s environment variables are case sensitive. For example,
25
+
having `Path` in your environment (case insensitive) is different than using
0 commit comments