Module rustc_middle::ty::sty

source ·
Expand description

This module contains TyKind and its major components.



  • Represents the projection of an associated type.
  • Binder is a binder for higher-ranked lifetimes or types. It is part of the compiler’s representation for things like for<'a> Fn(&'a isize) (which would be represented by the type PolyTraitRef == Binder<'tcx, TraitRef>). Note that when we instantiate, erase, or otherwise “discharge” these bound vars, we change the type from Binder<'tcx, T> to just T (see e.g., liberate_late_bound_regions).
  • A closure can be modeled as a struct that looks like:
  • Struct returned by split().
  • Similar to ClosureArgs; see the above documentation for more.
  • A ProjectionPredicate for an ExistentialTraitRef.
  • An existential reference to a trait, where Self is erased. For example, the trait object Trait<'a, 'b, X, Y> is:
  • Signature of a function type, which we have arbitrarily decided to use to refer to the input/output types.
  • An inline const is modeled like
  • Struct returned by split().
  • The parameter representation of late-bound function parameters, “some region at least as big as the scope fr.scope”.
  • Use this rather than RegionKind, whenever possible.
  • A region (lifetime) variable ID.
  • A complete reference to a trait. These take numerous guises in syntax, but perhaps the most recognizable form is in a where-clause:



Type Aliases§