[][src]Struct rustc_middle::ty::query::on_disk_cache::CacheDecoder

struct CacheDecoder<'a, 'tcx> {
    tcx: TyCtxt<'tcx>,
    opaque: Decoder<'a>,
    source_map: &'a SourceMap,
    cnum_map: &'a IndexVec<CrateNum, Option<CrateNum>>,
    file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>,
    file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, StableSourceFileId>,
    alloc_decoding_session: AllocDecodingSession<'a>,
    syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>,
    expn_data: &'a FxHashMap<u32, AbsoluteBytePos>,
    hygiene_context: &'a HygieneDecodeContext,
}

A decoder that can read from the incr. comp. 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: Decoder<'a>source_map: &'a SourceMapcnum_map: &'a IndexVec<CrateNum, Option<CrateNum>>file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, StableSourceFileId>alloc_decoding_session: AllocDecodingSession<'a>syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>expn_data: &'a FxHashMap<u32, AbsoluteBytePos>hygiene_context: &'a HygieneDecodeContext

Implementations

impl<'a, 'tcx> CacheDecoder<'a, 'tcx>[src]

fn file_index_to_file(&self, index: SourceFileIndex) -> Lrc<SourceFile>[src]

Trait Implementations

impl<'a, 'tcx> Decoder for CacheDecoder<'a, 'tcx>[src]

type Error = String

impl<'a, 'tcx> DecoderWithPosition for CacheDecoder<'a, 'tcx>[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [Body<'_x>]> for CacheDecoder<'a, 'tcx> where
    &'_a [Body<'_x>]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [BorrowCheckResult<'_x>]> for CacheDecoder<'a, 'tcx> where
    &'_a [BorrowCheckResult<'_x>]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [HashSet<DefId, BuildHasherDefault<FxHasher>>]> for CacheDecoder<'a, 'tcx> where
    &'_a [DefIdSet]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [HashSet<LocalDefId, BuildHasherDefault<FxHasher>>]> for CacheDecoder<'a, 'tcx> where
    &'_a [FxHashSet<LocalDefId>]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [IndexVec<Promoted, Body<'_x>>]> for CacheDecoder<'a, 'tcx> where
    &'_a [IndexVec<Promoted, Body<'_x>>]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [InlineAsmTemplatePiece]> for CacheDecoder<'a, 'tcx> where
    &'_a [InlineAsmTemplatePiece]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [Span]> for CacheDecoder<'a, 'tcx> where
    &'_a [Span]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [TypeckResults<'_x>]> for CacheDecoder<'a, 'tcx> where
    &'_a [TypeckResults<'_x>]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a [UnsafetyCheckResult]> for CacheDecoder<'a, 'tcx> where
    &'_a [UnsafetyCheckResult]: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a Body<'_x>> for CacheDecoder<'a, 'tcx> where
    &'_a Body<'_x>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a BorrowCheckResult<'_x>> for CacheDecoder<'a, 'tcx> where
    &'_a BorrowCheckResult<'_x>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a HashSet<DefId, BuildHasherDefault<FxHasher>>> for CacheDecoder<'a, 'tcx> where
    &'_a DefIdSet: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a HashSet<LocalDefId, BuildHasherDefault<FxHasher>>> for CacheDecoder<'a, 'tcx> where
    &'_a FxHashSet<LocalDefId>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a IndexVec<Promoted, Body<'_x>>> for CacheDecoder<'a, 'tcx> where
    &'_a IndexVec<Promoted, Body<'_x>>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a InlineAsmTemplatePiece> for CacheDecoder<'a, 'tcx> where
    &'_a InlineAsmTemplatePiece: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a Span> for CacheDecoder<'a, 'tcx> where
    &'_a Span: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a TypeckResults<'_x>> for CacheDecoder<'a, 'tcx> where
    &'_a TypeckResults<'_x>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, '_w, '_a, 'a, 'tcx> SpecializedDecoder<&'_a UnsafetyCheckResult> for CacheDecoder<'a, 'tcx> where
    &'_a UnsafetyCheckResult: UseSpecializedDecodable
[src]

impl<'_x, '_y, 'a, 'tcx> SpecializedDecoder<&'_x [(Predicate<'_y>, Span)]> for CacheDecoder<'a, 'tcx> where
    &'_x [(Predicate<'_y>, Span)]: UseSpecializedDecodable
[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<&'_x AdtDef> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<&'_x Allocation<(), ()>> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, '_y, 'a, 'tcx> SpecializedDecoder<&'_x Const<'_y>> for CacheDecoder<'a, 'tcx> where
    &'_x Const<'_y>: UseSpecializedDecodable
[src]

impl<'_x, '_y, '_z, 'a, 'tcx> SpecializedDecoder<&'_x List<&'_y TyS<'_z>>> for CacheDecoder<'a, 'tcx> where
    &'_x List<&'_y TyS<'_z>>: UseSpecializedDecodable
[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<&'_x List<CanonicalVarInfo>> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, '_y, 'a, 'tcx> SpecializedDecoder<&'_x List<ExistentialPredicate<'_y>>> for CacheDecoder<'a, 'tcx> where
    &'_x List<ExistentialPredicate<'_y>>: UseSpecializedDecodable
[src]

impl<'_x, '_y, 'a, 'tcx> SpecializedDecoder<&'_x List<GenericArg<'_y>>> for CacheDecoder<'a, 'tcx> where
    &'_x InternalSubsts<'_y>: UseSpecializedDecodable
[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<&'_x RegionKind> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, '_y, 'a, 'tcx> SpecializedDecoder<&'_x TyS<'_y>> for CacheDecoder<'a, 'tcx> where
    &'_x TyS<'_y>: UseSpecializedDecodable
[src]

impl<'a, 'tcx> SpecializedDecoder<AllocId> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<CrateNum> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<DefId> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<DefIndex> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<ExpnId> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<Fingerprint> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<Ident> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<LocalDefId> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<Place<'_x>> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<Predicate<'_x>> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<Span> for CacheDecoder<'a, 'tcx>[src]

impl<'_x, 'a, 'tcx> SpecializedDecoder<SymbolName<'_x>> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> SpecializedDecoder<SyntaxContext> for CacheDecoder<'a, 'tcx>[src]

impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx>[src]

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for CacheDecoder<'a, 'tcx>

impl<'a, 'tcx> !Send for CacheDecoder<'a, 'tcx>

impl<'a, 'tcx> !Sync for CacheDecoder<'a, 'tcx>

impl<'a, 'tcx> Unpin for CacheDecoder<'a, 'tcx>

impl<'a, 'tcx> !UnwindSafe for CacheDecoder<'a, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<D, T> SpecializedDecoder<T> for D where
    D: Decoder,
    T: UseSpecializedDecodable
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]