enum AnnotatedBorrowFnSignature<'tcx> {
NamedFunction {
arguments: Vec<(Ty<'tcx>, Span)>,
return_ty: Ty<'tcx>,
return_span: Span,
},
AnonymousFunction {
argument_ty: Ty<'tcx>,
argument_span: Span,
return_ty: Ty<'tcx>,
return_span: Span,
},
Closure {
argument_ty: Ty<'tcx>,
argument_span: Span,
},
}Variants
NamedFunction
AnonymousFunction
Closure
Implementations
sourceimpl<'tcx> AnnotatedBorrowFnSignature<'tcx>
impl<'tcx> AnnotatedBorrowFnSignature<'tcx>
sourcepub(crate) fn emit(
&self,
cx: &mut MirBorrowckCtxt<'_, 'tcx>,
diag: &mut DiagnosticBuilder<'_>
) -> String
pub(crate) fn emit(
&self,
cx: &mut MirBorrowckCtxt<'_, 'tcx>,
diag: &mut DiagnosticBuilder<'_>
) -> String
Annotate the provided diagnostic with information about borrow from the fn signature that helps explain.
Trait Implementations
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for AnnotatedBorrowFnSignature<'tcx>
impl<'tcx> !Send for AnnotatedBorrowFnSignature<'tcx>
impl<'tcx> !Sync for AnnotatedBorrowFnSignature<'tcx>
impl<'tcx> Unpin for AnnotatedBorrowFnSignature<'tcx>
impl<'tcx> !UnwindSafe for AnnotatedBorrowFnSignature<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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: 48 bytes
Size for each variant:
NamedFunction: 44 bytesAnonymousFunction: 36 bytesClosure: 20 bytes