pub struct TermsContext<'a, 'tcx> {
    pub tcx: TyCtxt<'tcx>,
    pub arena: &'a DroplessArena,
    pub lang_items: Vec<(LocalDefId, Vec<Variance>)>,
    pub inferred_starts: LocalDefIdMap<InferredIndex>,
    pub inferred_terms: Vec<&'a VarianceTerm<'a>>,
}
Expand description

The first pass over the crate simply builds up the set of inferreds.

Fields§

§tcx: TyCtxt<'tcx>§arena: &'a DroplessArena§lang_items: Vec<(LocalDefId, Vec<Variance>)>

For marker types, UnsafeCell, and other lang items where variance is hardcoded, records the item-id and the hardcoded variance.

§inferred_starts: LocalDefIdMap<InferredIndex>

Maps from the node id of an item to the first inferred index used for its type & region parameters.

§inferred_terms: Vec<&'a VarianceTerm<'a>>

Maps from an InferredIndex to the term for that variable.

Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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