pub(crate) struct SemiDynamicQueryDispatcher<'tcx, C: QueryCache, const FLAGS: QueryFlags> {
pub(crate) vtable: &'tcx QueryVTable<'tcx, C>,
}Expand description
Combines a [QueryVTable] with some additional compile-time booleans
to implement QueryDispatcher, for use by code in rustc_query_system.
Baking these boolean flags into the type gives a modest but measurable improvement to compiler perf and compiler code size; see https://github.com/rust-lang/rust/pull/151633.
Fields§
§vtable: &'tcx QueryVTable<'tcx, C>Trait Implementations§
Source§impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> Clone for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> Clone for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
Source§impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> QueryDispatcher<'tcx> for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> QueryDispatcher<'tcx> for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
Source§type Qcx = QueryCtxt<'tcx>
type Qcx = QueryCtxt<'tcx>
Query context used by this dispatcher, i.e.
rustc_query_impl::QueryCtxt.type Key = <C as QueryCache>::Key
type Value = <C as QueryCache>::Value
type Cache = C
fn name(self) -> &'static str
fn will_cache_on_disk_for_key(self, tcx: TyCtxt<'tcx>, key: &Self::Key) -> bool
fn query_state(self, qcx: QueryCtxt<'tcx>) -> &'tcx QueryState<'tcx, Self::Key>
fn query_cache(self, qcx: QueryCtxt<'tcx>) -> &'tcx Self::Cache
fn execute_query(self, tcx: TyCtxt<'tcx>, key: Self::Key) -> Self::Value
fn compute(self, qcx: QueryCtxt<'tcx>, key: Self::Key) -> Self::Value
fn try_load_from_disk( self, qcx: QueryCtxt<'tcx>, key: &Self::Key, prev_index: SerializedDepNodeIndex, index: DepNodeIndex, ) -> Option<Self::Value>
fn is_loadable_from_disk( self, qcx: QueryCtxt<'tcx>, key: &Self::Key, index: SerializedDepNodeIndex, ) -> bool
Source§fn value_from_cycle_error(
self,
tcx: TyCtxt<'tcx>,
cycle_error: &CycleError,
guar: ErrorGuaranteed,
) -> Self::Value
fn value_from_cycle_error( self, tcx: TyCtxt<'tcx>, cycle_error: &CycleError, guar: ErrorGuaranteed, ) -> Self::Value
Synthesize an error value to let compilation continue after a cycle.
fn format_value(self) -> fn(&Self::Value) -> String
fn anon(self) -> bool
fn eval_always(self) -> bool
fn depth_limit(self) -> bool
fn feedable(self) -> bool
fn dep_kind(self) -> DepKind
fn cycle_error_handling(self) -> CycleErrorHandling
fn hash_result(self) -> HashResult<Self::Value>
fn construct_dep_node( self, tcx: <Self::Qcx as HasDepContext>::DepContext, key: &Self::Key, ) -> DepNode
impl<'tcx, C: QueryCache, const FLAGS: QueryFlags> Copy for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
Auto Trait Implementations§
impl<'tcx, C, const FLAGS: QueryFlags> DynSend for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> DynSync for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> Freeze for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> RefUnwindSafe for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> Send for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> Sync for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> Unpin for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
impl<'tcx, C, const FLAGS: QueryFlags> UnwindSafe for SemiDynamicQueryDispatcher<'tcx, C, FLAGS>
Blanket Implementations§
§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T
fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]
Source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T
fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 8 bytes