rustc_middle::ty::fast_reject

Type Alias SimplifiedType

Source
pub type SimplifiedType = SimplifiedType<DefId>;

Aliased Type§

enum SimplifiedType {
Show 23 variants Bool, Char, Int(IntTy), Uint(UintTy), Float(FloatTy), Adt(DefId), Foreign(DefId), Str, Array, Slice, Ref(Mutability), Ptr(Mutability), Never, Tuple(usize), MarkerTraitObject, Trait(DefId), Closure(DefId), Coroutine(DefId), CoroutineWitness(DefId), Function(usize), UnsafeBinder, Placeholder, Error,
}

Variants§

§

Bool

§

Char

§

Int(IntTy)

§

Uint(UintTy)

§

Float(FloatTy)

§

Adt(DefId)

§

Foreign(DefId)

§

Str

§

Array

§

Slice

§

Ref(Mutability)

§

Ptr(Mutability)

§

Never

§

Tuple(usize)

§

MarkerTraitObject

A trait object, all of whose components are markers (e.g., dyn Send + Sync).

§

Trait(DefId)

§

Closure(DefId)

§

Coroutine(DefId)

§

CoroutineWitness(DefId)

§

Function(usize)

§

UnsafeBinder

§

Placeholder

§

Error

Implementations

Source§

impl<DefId> SimplifiedType<DefId>

Source

pub fn def(self) -> Option<DefId>

Trait Implementations§

Source§

impl EraseType for SimplifiedType

Source§

type Result = [u8; 16]

Source§

impl Key for SimplifiedType

Source§

type Cache<V> = DefaultCache<SimplifiedType<DefId>, V>

Source§

fn default_span(&self, _: TyCtxt<'_>) -> Span

In the event that a cycle occurs, if no explicit span has been given for a query with key self, what span should we use?
Source§

fn key_as_def_id(&self) -> Option<DefId>

If the key is a DefId or DefId–equivalent, return that DefId. Otherwise, return None.
Source§

fn def_id_for_ty_in_cycle(&self) -> Option<DefId>

Used to detect when ADT def ids are used as keys in a cycle for better error reporting.
Source§

impl ParameterizedOverTcx for SimplifiedType

Source§

impl<DefId> Clone for SimplifiedType<DefId>
where DefId: Clone,

Source§

fn clone(&self) -> SimplifiedType<DefId>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<DefId> Debug for SimplifiedType<DefId>
where DefId: Debug,

Source§

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

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

impl<DefId, __D> Decodable<__D> for SimplifiedType<DefId>
where __D: TyDecoder, DefId: Decodable<__D>,

Source§

fn decode(__decoder: &mut __D) -> SimplifiedType<DefId>

Source§

impl<DefId, __E> Encodable<__E> for SimplifiedType<DefId>
where __E: TyEncoder, DefId: Encodable<__E>,

Source§

fn encode(&self, __encoder: &mut __E)

Source§

impl<DefId> Hash for SimplifiedType<DefId>
where DefId: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

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

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<DefId, __CTX> HashStable<__CTX> for SimplifiedType<DefId>
where DefId: HashStable<__CTX>,

Source§

fn hash_stable( &self, __hcx: &mut __CTX, __hasher: &mut StableHasher<SipHasher128>, )

Source§

impl<DefId> PartialEq for SimplifiedType<DefId>
where DefId: PartialEq,

Source§

fn eq(&self, other: &SimplifiedType<DefId>) -> 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<HCX, DefId> ToStableHashKey<HCX> for SimplifiedType<DefId>
where HCX: Clone, DefId: HashStable<HCX>,

Source§

impl<DefId> Copy for SimplifiedType<DefId>
where DefId: Copy,

Source§

impl<DefId> Eq for SimplifiedType<DefId>
where DefId: Eq,

Source§

impl<DefId> StructuralPartialEq for SimplifiedType<DefId>

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: 16 bytes

Size for each variant:

  • Bool: 0 bytes
  • Char: 0 bytes
  • Int: 1 byte
  • Uint: 1 byte
  • Float: 1 byte
  • Adt: 11 bytes
  • Foreign: 11 bytes
  • Str: 0 bytes
  • Array: 0 bytes
  • Slice: 0 bytes
  • Ref: 1 byte
  • Ptr: 1 byte
  • Never: 0 bytes
  • Tuple: 15 bytes
  • MarkerTraitObject: 0 bytes
  • Trait: 11 bytes
  • Closure: 11 bytes
  • Coroutine: 11 bytes
  • CoroutineWitness: 11 bytes
  • Function: 15 bytes
  • UnsafeBinder: 0 bytes
  • Placeholder: 0 bytes
  • Error: 0 bytes