pub(crate) enum CallKind<'tcx> {
    Normal {
        self_arg: Option<Ident>,
        desugaring: Option<(CallDesugaringKind, Ty<'tcx>)>,
        method_did: DefId,
    },
    FnCall {
        fn_trait_id: DefId,
        self_ty: Ty<'tcx>,
    },
    Operator {
        self_arg: Option<Ident>,
        trait_id: DefId,
        self_ty: Ty<'tcx>,
    },
    DerefCoercion {
        deref_target: Span,
        deref_target_ty: Ty<'tcx>,
        self_ty: Ty<'tcx>,
    },
}

Variants§

§

Normal

Fields

§self_arg: Option<Ident>
§desugaring: Option<(CallDesugaringKind, Ty<'tcx>)>
§method_did: DefId

A normal method call of the form receiver.foo(a, b, c)

§

FnCall

Fields

§fn_trait_id: DefId
§self_ty: Ty<'tcx>

A call to Fn(..)::call(..), desugared from my_closure(a, b, c)

§

Operator

Fields

§self_arg: Option<Ident>
§trait_id: DefId
§self_ty: Ty<'tcx>

A call to an operator trait, desugared from operator syntax (e.g. a << b)

§

DerefCoercion

Fields

§deref_target: Span

The Span of the Target associated type in the Deref impl we are using.

§deref_target_ty: Ty<'tcx>

The type T::Deref we are dereferencing to

§self_ty: Ty<'tcx>

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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: 40 bytes

Size for each variant:

  • Normal: 36 bytes
  • FnCall: 20 bytes
  • Operator: 28 bytes
  • DerefCoercion: 28 bytes