]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/cstore.rs
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[rust.git] / src / librustc_metadata / cstore.rs
index 22a13f37722b8cfced8117c8d8f7684b62ae7b37..5d8fabc7e69aeac1d01c3fc74c311948d3d2078a 100644 (file)
@@ -64,7 +64,11 @@ pub struct CrateMetadata {
     /// Used for decoding interpret::AllocIds in a cached & thread-safe manner.
     pub alloc_decoding_state: AllocDecodingState,
 
-    pub root: schema::CrateRoot,
+    // NOTE(eddyb) we pass `'static` to a `'tcx` parameter because this
+    // lifetime is only used behind `Lazy` / `LazySeq`, and therefore
+    // acts like an universal (`for<'tcx>`), that is paired up with
+    // whichever `TyCtxt` is being used to decode those values.
+    pub root: schema::CrateRoot<'static>,
 
     /// For each public item in this crate, we encode a key. When the
     /// crate is loaded, we read all the keys and put them in this