Struct rustc_middle::ich::StableHashingContext [−][src]
pub struct StableHashingContext<'a> {
sess: &'a Session,
definitions: &'a Definitions,
cstore: &'a dyn CrateStore,
pub(super) body_resolver: BodyResolver<'a>,
hash_spans: bool,
hash_bodies: bool,
pub(super) node_id_hashing_mode: NodeIdHashingMode,
raw_source_map: &'a SourceMap,
caching_source_map: Option<CachingSourceMapView<'a>>,
}Expand description
This is the context state available during incr. comp. hashing. It contains
enough information to transform DefIds and HirIds into stable DefPaths (i.e.,
a reference to the TyCtxt) and it holds a few caches for speeding up various
things (e.g., each DefId/DefPath is only hashed once).
Fields
sess: &'a Sessiondefinitions: &'a Definitionscstore: &'a dyn CrateStorebody_resolver: BodyResolver<'a>hash_spans: boolhash_bodies: boolnode_id_hashing_mode: NodeIdHashingModeraw_source_map: &'a SourceMapcaching_source_map: Option<CachingSourceMapView<'a>>Implementations
fn new_with_or_without_spans(
sess: &'a Session,
krate: &'a Crate<'a>,
definitions: &'a Definitions,
cstore: &'a dyn CrateStore,
always_ignore_spans: bool
) -> Self
fn new_with_or_without_spans(
sess: &'a Session,
krate: &'a Crate<'a>,
definitions: &'a Definitions,
cstore: &'a dyn CrateStore,
always_ignore_spans: bool
) -> SelfThe krate here is only used for mapping BodyIds to Bodys.
Don’t use it for anything else or you’ll run the risk of
leaking data out of the tracking system.
pub fn new(
sess: &'a Session,
krate: &'a Crate<'a>,
definitions: &'a Definitions,
cstore: &'a dyn CrateStore
) -> Selfpub fn ignore_spans(
sess: &'a Session,
krate: &'a Crate<'a>,
definitions: &'a Definitions,
cstore: &'a dyn CrateStore
) -> Selfpub fn with_node_id_hashing_mode<F: FnOnce(&mut Self)>(
&mut self,
mode: NodeIdHashingMode,
f: F
)Trait Implementations
impl<'__ctx, Id> HashStable<StableHashingContext<'__ctx>> for Export<Id> where
Id: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Id> HashStable<StableHashingContext<'__ctx>> for Export<Id> where
Id: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, O> HashStable<StableHashingContext<'__ctx>> for AssertKind<O> where
O: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, O> HashStable<StableHashingContext<'__ctx>> for AssertKind<O> where
O: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, R> HashStable<StableHashingContext<'__ctx>> for QueryResponse<'tcx, R> where
R: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, R> HashStable<StableHashingContext<'__ctx>> for QueryResponse<'tcx, R> where
R: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, V, T> HashStable<StableHashingContext<'__ctx>> for ProjectionElem<V, T> where
T: HashStable<StableHashingContext<'__ctx>>,
V: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, V, T> HashStable<StableHashingContext<'__ctx>> for ProjectionElem<V, T> where
T: HashStable<StableHashingContext<'__ctx>>,
V: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for Normalize<T> where
T: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for Normalize<T> where
T: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for MethodAutoderefStepsResult<'tcx>
impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for MethodAutoderefStepsResult<'tcx>impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSource<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSource<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceUserDefinedData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceUserDefinedData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceGeneratorData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceGeneratorData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceClosureData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceClosureData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceAutoImplData<N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceAutoImplData<N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceBuiltinData<N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceBuiltinData<N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceObjectData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceObjectData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceFnPointerData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceFnPointerData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceTraitAliasData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, N> HashStable<StableHashingContext<'__ctx>> for ImplSourceTraitAliasData<'tcx, N> where
N: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for GeneratorInteriorTypeCause<'tcx>
impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for GeneratorInteriorTypeCause<'tcx>impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for CanonicalUserTypeAnnotation<'tcx>
impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for CanonicalUserTypeAnnotation<'tcx>impl<'__ctx, A, B> HashStable<StableHashingContext<'__ctx>> for OutlivesPredicate<A, B> where
A: HashStable<StableHashingContext<'__ctx>>,
B: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, A, B> HashStable<StableHashingContext<'__ctx>> for OutlivesPredicate<A, B> where
A: HashStable<StableHashingContext<'__ctx>>,
B: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for WithOptConstParam<T> where
T: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for WithOptConstParam<T> where
T: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for Set1<T> where
T: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for Set1<T> where
T: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, Tag, Extra> HashStable<StableHashingContext<'__ctx>> for Allocation<Tag, Extra> where
Tag: HashStable<StableHashingContext<'__ctx>>,
Extra: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag, Extra> HashStable<StableHashingContext<'__ctx>> for Allocation<Tag, Extra> where
Tag: HashStable<StableHashingContext<'__ctx>>,
Extra: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx, V> HashStable<StableHashingContext<'__ctx>> for Canonical<'tcx, V> where
V: HashStable<StableHashingContext<'__ctx>>,
impl<'tcx, '__ctx, V> HashStable<StableHashingContext<'__ctx>> for Canonical<'tcx, V> where
V: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Scalar<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Scalar<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for ScalarMaybeUninit<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for ScalarMaybeUninit<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ClosureRegionRequirements<'tcx>
impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ClosureRegionRequirements<'tcx>impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ClosureOutlivesRequirement<'tcx>
impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ClosureOutlivesRequirement<'tcx>impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for ClearCrossCrate<T> where
T: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, T> HashStable<StableHashingContext<'__ctx>> for ClearCrossCrate<T> where
T: HashStable<StableHashingContext<'__ctx>>, impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for Binder<'tcx, T> where
T: HashStable<StableHashingContext<'a>>,
impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for Binder<'tcx, T> where
T: HashStable<StableHashingContext<'a>>, impl<'a, Tag> HashStable<StableHashingContext<'a>> for Relocations<Tag> where
Tag: HashStable<StableHashingContext<'a>>,
impl<'a, Tag> HashStable<StableHashingContext<'a>> for Relocations<Tag> where
Tag: HashStable<StableHashingContext<'a>>, impl<'a, D> HashStable<StableHashingContext<'a>> for SimplifiedTypeGen<D> where
D: Copy + Debug + Ord + Eq + HashStable<StableHashingContext<'a>>,
impl<'a, D> HashStable<StableHashingContext<'a>> for SimplifiedTypeGen<D> where
D: Copy + Debug + Ord + Eq + HashStable<StableHashingContext<'a>>, impl<'a, T> HashStable<StableHashingContext<'a>> for Placeholder<T> where
T: HashStable<StableHashingContext<'a>>,
impl<'a, T> HashStable<StableHashingContext<'a>> for Placeholder<T> where
T: HashStable<StableHashingContext<'a>>, impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for ParamEnvAnd<'tcx, T> where
T: HashStable<StableHashingContext<'a>>,
impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for ParamEnvAnd<'tcx, T> where
T: HashStable<StableHashingContext<'a>>, impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for &'tcx List<T> where
T: HashStable<StableHashingContext<'a>>,
impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for &'tcx List<T> where
T: HashStable<StableHashingContext<'a>>, Obtains a cache for storing the Fingerprint of an ExpnId.
This method allows us to have multiple HashStableContext implementations
that hash things in a different way, without the results of one polluting
the cache of the other. Read more
type KeyType = ItemLocalIdtype KeyType = (DefPathHash, ItemLocalId)type KeyType = (DefPathHash, SmallVec<[DefPathHash; 1]>)impl<'a, 'tcx, T> ToStableHashKey<StableHashingContext<'a>> for &'tcx List<T> where
T: HashStable<StableHashingContext<'a>>,
impl<'a, 'tcx, T> ToStableHashKey<StableHashingContext<'a>> for &'tcx List<T> where
T: HashStable<StableHashingContext<'a>>, type KeyType = FingerprintAuto Trait Implementations
impl<'a> !RefUnwindSafe for StableHashingContext<'a>impl<'a> !Send for StableHashingContext<'a>impl<'a> !Sync for StableHashingContext<'a>impl<'a> Unpin for StableHashingContext<'a>impl<'a> !UnwindSafe for StableHashingContext<'a>Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 192 bytes