pub struct FnPointer<'tcx> {
def_id: DefId,
self_ty: Ty<'tcx>,
rustc_sig: PolyFnSig<'tcx>,
param_env: ParamEnv<'tcx>,
sig: PolyFnSig<'tcx>,
late_bound_scope: DefId,
fn_trait_impls: OnceCell<Option<FnTraitImpls<'tcx>>>,
}Fields§
§def_id: DefId§self_ty: Ty<'tcx>§rustc_sig: PolyFnSig<'tcx>§param_env: ParamEnv<'tcx>§sig: PolyFnSig<'tcx>§late_bound_scope: DefId§fn_trait_impls: OnceCell<Option<FnTraitImpls<'tcx>>>Implementations§
Source§impl<'tcx> FnPointer<'tcx>
impl<'tcx> FnPointer<'tcx>
pub fn param_env(&self) -> &ParamEnv<'tcx>
pub fn sig(&self) -> &PolyFnSig<'tcx>
Sourcepub fn late_bound_scope(&self) -> RDefId
pub fn late_bound_scope(&self) -> RDefId
DefId we use for liberate_bound_regions. We stole some DefId from somewhere to serve as
placeholder here, as this needs to be a real rustc DefId. It only matters for matching up
generics during translation.
pub fn fn_trait_impls( &self, s: &impl BaseState<'tcx>, ) -> Option<&FnTraitImpls<'tcx>>
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !DynSync for FnPointer<'tcx>
impl<'tcx> !Freeze for FnPointer<'tcx>
impl<'tcx> !RefUnwindSafe for FnPointer<'tcx>
impl<'tcx> !Sync for FnPointer<'tcx>
impl<'tcx> !UnwindSafe for FnPointer<'tcx>
impl<'tcx> DynSend for FnPointer<'tcx>
impl<'tcx> Send for FnPointer<'tcx>
impl<'tcx> Unpin for FnPointer<'tcx>
impl<'tcx> UnsafeUnpin for FnPointer<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more