enum RetagPlan<V> {
EmitRetag(RetagInfo<V>),
Recurse {
field_plans: FxIndexMap<FieldIdx, RetagPlan<V>>,
variant_plans: FxIndexMap<VariantIdx, RetagPlan<V>>,
},
}Expand description
A description of the pointers within a type that need to be retagged.
Variants§
EmitRetag(RetagInfo<V>)
Indicates that a pointer should be retagged.
Recurse
Indicates that one or more fields or variants of this type contain pointers that need to be retagged.
Fields
field_plans: FxIndexMap<FieldIdx, RetagPlan<V>>variant_plans: FxIndexMap<VariantIdx, RetagPlan<V>>Implementations§
Source§impl<'a, 'tcx, V> RetagPlan<V>
impl<'a, 'tcx, V> RetagPlan<V>
Sourcefn build<Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
layout: TyAndLayout<'tcx>,
is_fn_entry: bool,
) -> Option<RetagPlan<Bx::Value>>
fn build<Bx: BuilderMethods<'a, 'tcx>>( bx: &mut Bx, layout: TyAndLayout<'tcx>, is_fn_entry: bool, ) -> Option<RetagPlan<Bx::Value>>
Attempts to create a RetagPlan for a place or operand with the given layout.
Sourcefn walk_value<Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
layout: TyAndLayout<'tcx>,
is_fn_entry: bool,
) -> Option<RetagPlan<Bx::Value>>
fn walk_value<Bx: BuilderMethods<'a, 'tcx>>( bx: &mut Bx, layout: TyAndLayout<'tcx>, is_fn_entry: bool, ) -> Option<RetagPlan<Bx::Value>>
Recurses through the fields and variants of a value in memory order to create a RetagPlan.
Sourcefn visit_box<Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx,
layout: TyAndLayout<'tcx>,
is_fn_entry: bool,
) -> Option<RetagPlan<Bx::Value>>
fn visit_box<Bx: BuilderMethods<'a, 'tcx>>( bx: &mut Bx, layout: TyAndLayout<'tcx>, is_fn_entry: bool, ) -> Option<RetagPlan<Bx::Value>>
Emits a retag for a Box.
Sourcefn emit_retag<Bx: BuilderMethods<'a, 'tcx>>(
_bx: &mut Bx,
_pointee_layout: TyAndLayout<'tcx>,
_ptr_kind: Option<Mutability>,
_is_fn_entry: bool,
) -> Option<RetagPlan<Bx::Value>>
fn emit_retag<Bx: BuilderMethods<'a, 'tcx>>( _bx: &mut Bx, _pointee_layout: TyAndLayout<'tcx>, _ptr_kind: Option<Mutability>, _is_fn_entry: bool, ) -> Option<RetagPlan<Bx::Value>>
Determines if a pointer needs to be retagged, when it points to
a type with the given layout. Returns None for mutable pointers
to types that are entirely covered by UnsafePinned, for which retags
are a no-op.
Trait Implementations§
Auto Trait Implementations§
impl<V> DynSend for RetagPlan<V>where
V: DynSend,
impl<V> DynSync for RetagPlan<V>where
V: DynSync,
impl<V> Freeze for RetagPlan<V>where
V: Freeze,
impl<V> RefUnwindSafe for RetagPlan<V>where
V: RefUnwindSafe,
impl<V> Send for RetagPlan<V>where
V: Send,
impl<V> Sync for RetagPlan<V>where
V: Sync,
impl<V> Unpin for RetagPlan<V>where
V: Unpin,
impl<V> UnsafeUnpin for RetagPlan<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for RetagPlan<V>where
V: UnwindSafe,
Blanket Implementations§
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
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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 moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§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<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>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.