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 Diagnostic
) -> String
pub(crate) fn emit(
&self,
cx: &mut MirBorrowckCtxt<'_, 'tcx>,
diag: &mut Diagnostic
) -> 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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