diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-11 16:44:18 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-11 16:44:33 +0100 |
| commit | 6ce2fefea63abab01b9f4892d7608fabba97a7ce (patch) | |
| tree | 50233cccd4b42f48467b1c3d46e9b4bee8208335 /compiler | |
| parent | 6f40082313d8374bdf962aba943a712d5322fae6 (diff) | |
| download | rust-6ce2fefea63abab01b9f4892d7608fabba97a7ce.tar.gz rust-6ce2fefea63abab01b9f4892d7608fabba97a7ce.zip | |
Add support for `--env` on `tracked_env::var`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_expand/src/proc_macro_server.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/proc_macro_server.rs b/compiler/rustc_expand/src/proc_macro_server.rs index 5308e338d7f..523e0eda40e 100644 --- a/compiler/rustc_expand/src/proc_macro_server.rs +++ b/compiler/rustc_expand/src/proc_macro_server.rs @@ -426,6 +426,10 @@ impl server::Types for Rustc<'_, '_> { } impl server::FreeFunctions for Rustc<'_, '_> { + fn injected_env_var(&mut self, var: &str) -> Option<String> { + self.ecx.sess.opts.logical_env.get(var).cloned() + } + fn track_env_var(&mut self, var: &str, value: Option<&str>) { self.sess() .env_depinfo |
