@@ -123,22 +123,22 @@ is in the cache, then instead of serializing the type as usual, the byte offset
123
123
within the file being written is encoded instead. A similar scheme is used for
124
124
` ty::Predicate ` .
125
125
126
- ## ` Lazy <T>`
126
+ ## ` LazyValue <T>`
127
127
128
128
Crate metadata is initially loaded before the ` TyCtxt<'tcx> ` is created, so
129
129
some deserialization needs to be deferred from the initial loading of metadata.
130
- The [ ` Lazy <T>` ] type wraps the (relative) offset in the crate metadata where a
131
- ` T ` has been serialized.
130
+ The [ ` LazyValue <T>` ] type wraps the (relative) offset in the crate metadata where a
131
+ ` T ` has been serialized. There are also some variants, [ ` LazyArray<T> ` ] and [ ` LazyTable<I, T> ` ] .
132
132
133
- The ` Lazy<[T]> ` and ` Lazy<Table< I, T> >` type provide some functionality over
133
+ The ` Lazy<[T]> ` and ` LazyTable< I, T>` type provide some functionality over
134
134
` Lazy<Vec<T>> ` and ` Lazy<HashMap<I, T>> ` :
135
135
136
- - It's possible to encode a ` Lazy<[T] >` directly from an iterator, without
136
+ - It's possible to encode a ` LazyArray<T >` directly from an iterator, without
137
137
first collecting into a ` Vec<T> ` .
138
- - Indexing into a ` Lazy<Table< I, T> >` does not require decoding entries other
138
+ - Indexing into a ` LazyTable< I, T>` does not require decoding entries other
139
139
than the one being read.
140
140
141
- ** note** : ` Lazy <T>` does not cache its value after being deserialized the first
141
+ ** note** : ` LazyValue <T>` does not cache its value after being deserialized the first
142
142
time. Instead the query system is the main way of caching these results.
143
143
144
144
## Specialization
@@ -155,7 +155,9 @@ for `Encodable<CacheEncoder>`.
155
155
[ serialize ] : https://en.wikipedia.org/wiki/Serialization
156
156
157
157
[ `CrateInfo` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/struct.CrateInfo.html
158
- [ `Lazy<T>` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/struct.Lazy.html
158
+ [ `LazyArray<T>` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/struct.LazyValue.html
159
+ [ `LazyTable<I, T>` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/struct.LazyValue.html
160
+ [ `LazyValue<T>` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/struct.LazyValue.html
159
161
[ `RefDecodable` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/codec/trait.RefDecodable.html
160
162
[ `rustc_metadata::rmeta::decoder::DecodeContext` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/decoder/struct.DecodeContext.html
161
163
[ `rustc_metadata::rmeta::encoder::EncodeContext` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/encoder/struct.EncodeContext.html
0 commit comments