pub(super) struct ReverseMapper<'tcx> {
    tcx: TyCtxt<'tcx>,
    map: FxHashMap<GenericArg<'tcx>, GenericArg<'tcx>>,
    do_not_error: bool,
    ignore_errors: bool,
    span: Span,
}
Expand description

Converts generic params of a TypeFoldable from one item’s generics to another. Usually from a function’s generics list to the opaque type’s own generics.

Fields§

§tcx: TyCtxt<'tcx>§map: FxHashMap<GenericArg<'tcx>, GenericArg<'tcx>>§do_not_error: bool

see call sites to fold_kind_no_missing_regions_error for an explanation of this field.

§ignore_errors: bool

We do not want to emit any errors in typeck because the spans in typeck are subpar at the moment. Borrowck will do the same work again (this time with lifetime information) and thus report better errors.

§span: Span

Span of function being checked.

Implementations§

Trait 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: 56 bytes