pub type ListWithCachedTypeInfo<T> = RawList<TypeInfo, T>;
Expand description
A List
that additionally stores type information inline to speed up
TypeVisitableExt
operations.
Aliased Type§
struct ListWithCachedTypeInfo<T> {
skel: ListSkeleton<TypeInfo, T>,
opaque: OpaqueListContents,
}
Fields§
§skel: ListSkeleton<TypeInfo, T>
§opaque: OpaqueListContents
Implementations§
Source§impl<T> ListWithCachedTypeInfo<T>
impl<T> ListWithCachedTypeInfo<T>
pub fn flags(&self) -> TypeFlags
pub fn outer_exclusive_binder(&self) -> DebruijnIndex
Source§impl<H, T> RawList<H, T>
impl<H, T> RawList<H, T>
pub fn len(&self) -> usize
pub fn as_slice(&self) -> &[T]
Sourcepub(super) fn from_arena<'tcx>(
arena: &'tcx Arena<'tcx>,
header: H,
slice: &[T],
) -> &'tcx RawList<H, T>where
T: Copy,
pub(super) fn from_arena<'tcx>(
arena: &'tcx Arena<'tcx>,
header: H,
slice: &[T],
) -> &'tcx RawList<H, T>where
T: Copy,
Allocates a list from arena
and copies the contents of slice
into it.
WARNING: the contents must be unique, such that no list with these
contents has been previously created. If not, operations such as eq
and hash
might give incorrect results.
Panics if T
is Drop
, or T
is zero-sized, or the slice is empty
(because the empty list exists statically, and is available via
empty()
).
pub fn iter(&self) -> <&RawList<H, T> as IntoIterator>::IntoIterwhere
T: Copy,
Trait Implementations§
Source§impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<D> for &'tcx ListWithCachedTypeInfo<Clause<'tcx>>
impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<D> for &'tcx ListWithCachedTypeInfo<Clause<'tcx>>
Source§impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ListWithCachedTypeInfo<Clause<'tcx>>
impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ListWithCachedTypeInfo<Clause<'tcx>>
Source§impl<H, T> PartialOrd for RawList<H, T>where
T: PartialOrd,
impl<H, T> PartialOrd for RawList<H, T>where
T: PartialOrd,
impl<H: DynSync, T: DynSync> DynSync for RawList<H, T>
impl<H, T: Eq> Eq for RawList<H, T>
impl<H: Sync, T: Sync> Sync for RawList<H, T>
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.