Enum rustc_borrowck::diagnostics::FnSelfUseKind [−][src]
pub(crate) enum FnSelfUseKind<'tcx> {
Normal {
self_arg: Ident,
implicit_into_iter: bool,
is_option_or_result: bool,
},
FnOnceCall,
Operator {
self_arg: Ident,
},
DerefCoercion {
deref_target: Span,
deref_target_ty: Ty<'tcx>,
},
}Variants
Normal
Fields
self_arg: Identimplicit_into_iter: boolis_option_or_result: boolWhether the self type of the method call has an .as_ref() method.
Used for better diagnostics.
A normal method call of the form receiver.foo(a, b, c)
FnOnceCall
A call to FnOnce::call_once, desugared from my_closure(a, b, c)
Operator
Fields
self_arg: IdentA call to an operator trait, desuraged from operator syntax (e.g. a << b)
DerefCoercion
Fields
deref_target: SpanThe 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
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for FnSelfUseKind
impl<'tcx> !Send for FnSelfUseKind
impl<'tcx> !Sync for FnSelfUseKind
impl<'tcx> Unpin for FnSelfUseKind
impl<'tcx> !UnwindSafe for FnSelfUseKind
Blanket Implementations
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: 24 bytes
Size for each variant:
Normal: 15 bytesFnOnceCall: 0 bytesOperator: 15 bytesDerefCoercion: 23 bytes
