pub struct CacheDecoder<'a, 'tcx> {
    tcx: TyCtxt<'tcx>,
    opaque: MemDecoder<'a>,
    source_map: &'a SourceMap,
    file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>,
    file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, EncodedSourceFileId>,
    alloc_decoding_session: AllocDecodingSession<'a>,
    syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>,
    expn_data: &'a UnhashMap<ExpnHash, AbsoluteBytePos>,
    foreign_expn_data: &'a UnhashMap<ExpnHash, u32>,
    hygiene_context: &'a HygieneDecodeContext,
}
Expand description

A decoder that can read from the incremental compilation cache. It is similar to the one we use for crate metadata decoding in that it can rebase spans and eventually will also handle things that contain Ty instances.

Fields§

§tcx: TyCtxt<'tcx>§opaque: MemDecoder<'a>§source_map: &'a SourceMap§file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>§file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, EncodedSourceFileId>§alloc_decoding_session: AllocDecodingSession<'a>§syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>§expn_data: &'a UnhashMap<ExpnHash, AbsoluteBytePos>§foreign_expn_data: &'a UnhashMap<ExpnHash, u32>§hygiene_context: &'a HygieneDecodeContext

Implementations§

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 104 bytes