rustc_middle::ty

Type Alias ListWithCachedTypeInfo

Source
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>

Source§

impl<H, T> RawList<H, T>

Source

pub fn len(&self) -> usize

Source

pub fn as_slice(&self) -> &[T]

Source

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()).

Source

pub fn iter(&self) -> <&RawList<H, T> as IntoIterator>::IntoIter
where T: Copy,

Source§

impl<T> RawList<TypeInfo, T>

Source

pub fn empty<'a>() -> &'a RawList<TypeInfo, T>

Returns a reference to the (per header unique, static) empty list.

Trait Implementations§

Source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<D> for &'tcx ListWithCachedTypeInfo<Clause<'tcx>>

Source§

fn decode(decoder: &mut D) -> Self

Source§

impl<T> EraseType for &ListWithCachedTypeInfo<T>

Source§

type Result = [u8; 8]

Source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ListWithCachedTypeInfo<Clause<'tcx>>

Source§

fn decode(decoder: &mut D) -> &'tcx Self

Source§

impl<H, T> Aligned for RawList<H, T>

Source§

const ALIGN: Alignment = _

Alignment of Self.
Source§

impl<H, T> AsRef<[T]> for RawList<H, T>

Source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<H, T: Debug> Debug for RawList<H, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<H, T> Deref for RawList<H, T>

Source§

type Target = [T]

The resulting type after dereferencing.
Source§

fn deref(&self) -> &[T]

Dereferences the value.
Source§

impl<H, S: Encoder, T: Encodable<S>> Encodable<S> for RawList<H, T>

Source§

fn encode(&self, s: &mut S)

Source§

impl<Hdr, T> Hash for RawList<Hdr, T>

Source§

fn hash<H: Hasher>(&self, s: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<H, T> Ord for RawList<H, T>
where T: Ord,

Source§

fn cmp(&self, other: &RawList<H, T>) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl<H, T: PartialEq> PartialEq for RawList<H, T>

Source§

fn eq(&self, other: &RawList<H, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<H, T> PartialOrd for RawList<H, T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, other: &RawList<H, T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<H: DynSync, T: DynSync> DynSync for RawList<H, T>

Source§

impl<H, T: Eq> Eq for RawList<H, T>

Source§

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.