[][src]Type Definition rustc::ty::subst::InternalSubsts

type InternalSubsts<'tcx> = List<GenericArg<'tcx>>;
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A substitution mapping generic parameters to new values.

Methods

impl<'a, 'tcx> InternalSubsts<'tcx>[src]

pub fn as_closure(&'a self) -> ClosureSubsts<'a>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Interpret these substitutions as the substitutions of a closure type. Closure substitutions have a particular structure controlled by the compiler that encodes information like the signature and closure kind; see ty::ClosureSubsts struct for more comments.

pub fn as_generator(&'tcx self) -> GeneratorSubsts<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Interpret these substitutions as the substitutions of a generator type. Closure substitutions have a particular structure controlled by the compiler that encodes information like the signature and generator kind; see ty::GeneratorSubsts struct for more comments.

pub fn identity_for_item(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Creates a InternalSubsts that maps each generic parameter to itself.

pub fn bound_vars_for_item(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Creates a InternalSubsts that maps each generic parameter to a higher-ranked var bound at index 0. For types, we use a BoundVar index equal to the type parameter index. For regions, we use the BoundRegion::BrNamed variant (which has a DefId).

pub fn for_item<F>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    mk_kind: F
) -> SubstsRef<'tcx> where
    F: FnMut(&GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, 
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Creates a InternalSubsts for generic parameter definitions, by calling closures to obtain each kind. The closures get to observe the InternalSubsts as they're being built, which can be used to correctly substitute defaults of generic parameters.

pub fn extend_to<F>(
    &self,
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    mk_kind: F
) -> SubstsRef<'tcx> where
    F: FnMut(&GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, 
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn fill_item<F>(
    substs: &mut SmallVec<[GenericArg<'tcx>; 8]>,
    tcx: TyCtxt<'tcx>,
    defs: &Generics,
    mk_kind: &mut F
) where
    F: FnMut(&GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, 
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn fill_single<F>(
    substs: &mut SmallVec<[GenericArg<'tcx>; 8]>,
    defs: &Generics,
    mk_kind: &mut F
) where
    F: FnMut(&GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, 
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn is_noop(&self) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn types(&'a self) -> impl DoubleEndedIterator<Item = Ty<'tcx>> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn regions(&'a self) -> impl DoubleEndedIterator<Item = Region<'tcx>> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn consts(
    &'a self
) -> impl DoubleEndedIterator<Item = &'tcx Const<'tcx>> + 'a
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn non_erasable_generics(
    &'a self
) -> impl DoubleEndedIterator<Item = GenericArgKind<'tcx>> + 'a
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn type_at(&self, i: usize) -> Ty<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn region_at(&self, i: usize) -> Region<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn const_at(&self, i: usize) -> &'tcx Const<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn type_for_def(&self, def: &GenericParamDef) -> GenericArg<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn rebase_onto(
    &self,
    tcx: TyCtxt<'tcx>,
    source_ancestor: DefId,
    target_substs: SubstsRef<'tcx>
) -> SubstsRef<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Transform from substitutions for a child of source_ancestor (e.g., a trait or impl) to substitutions for the same child in a different item, with target_substs as the base for the target impl/trait, with the source child-specific parameters (e.g., method parameters) on top of that base.

pub fn truncate_to(
    &self,
    tcx: TyCtxt<'tcx>,
    generics: &Generics
) -> SubstsRef<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.