pub trait FnAbiOf<'tcx>: FnAbiOfHelpers<'tcx> {
    fn fn_abi_of_fn_ptr(
        &self,
        sig: PolyFnSig<'tcx>,
        extra_args: &'tcx List<Ty<'tcx>>
    ) -> Self::FnAbiOfResult { ... } fn fn_abi_of_instance(
        &self,
        instance: Instance<'tcx>,
        extra_args: &'tcx List<Ty<'tcx>>
    ) -> Self::FnAbiOfResult { ... } }
Expand description

Blanket extension trait for contexts that can compute FnAbis.

Provided Methods§

Compute a FnAbi suitable for indirect calls, i.e. to fn pointers.

NB: this doesn’t handle virtual calls - those should use fn_abi_of_instance instead, where the instance is an InstanceDef::Virtual.

Compute a FnAbi suitable for declaring/defining an fn instance, and for direct calls to an fn.

NB: that includes virtual calls, which are represented by “direct calls” to an InstanceDef::Virtual instance (of <dyn Trait as Trait>::fn).

Implementors§