Struct rustc_query_impl::ty::InlineConstSubsts [−][src]
pub struct InlineConstSubsts<'tcx> {
pub substs: &'tcx List<GenericArg<'tcx>>,
}Expand description
An inline const is modeled like
const InlineConst<'l0...'li, T0...Tj, R>: R;where:
- ’l0…’li and T0…Tj are the generic parameters inherited from the item that defined the inline const,
- R represents the type of the constant.
When the inline const is instantiated, R is substituted as the actual inferred
type of the constant. The reason that R is represented as an extra type parameter
is the same reason that ClosureSubsts have CS and U as type parameters:
inline const can reference lifetimes that are internal to the creating function.
Fields
substs: &'tcx List<GenericArg<'tcx>>Generic parameters from the enclosing item, concatenated with the inferred type of the constant.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for InlineConstSubsts<'tcx>
impl<'tcx> !Send for InlineConstSubsts<'tcx>
impl<'tcx> !Sync for InlineConstSubsts<'tcx>
impl<'tcx> Unpin for InlineConstSubsts<'tcx>
impl<'tcx> !UnwindSafe for InlineConstSubsts<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
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: 8 bytes