]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_session/parse.rs
Auto merge of #71858 - petrochenkov:env, r=Mark-Simulacrum
[rust.git] / src / librustc_session / parse.rs
index ddbc95fb1b0b8ed61888b9b91a4829924aec1913..93b27cabfb67b34e8a35d986bdfa356634c66ba2 100644 (file)
@@ -135,6 +135,8 @@ pub struct ParseSess {
     pub symbol_gallery: SymbolGallery,
     /// The parser has reached `Eof` due to an unclosed brace. Used to silence unnecessary errors.
     pub reached_eof: Lock<bool>,
+    /// Environment variables accessed during the build and their values when they exist.
+    pub env_depinfo: Lock<FxHashSet<(Symbol, Option<Symbol>)>>,
 }
 
 impl ParseSess {
@@ -160,6 +162,7 @@ pub fn with_span_handler(handler: Handler, source_map: Lrc<SourceMap>) -> Self {
             gated_spans: GatedSpans::default(),
             symbol_gallery: SymbolGallery::default(),
             reached_eof: Lock::new(false),
+            env_depinfo: Default::default(),
         }
     }