pub enum InferenceDiagnostic<'db> {
Show 18 variants
NoSuchField {
field: ExprOrPatId,
private: Option<LocalFieldId>,
variant: VariantId,
},
PrivateField {
expr: ExprId,
field: FieldId,
},
PrivateAssocItem {
id: ExprOrPatId,
item: AssocItemId,
},
UnresolvedField {
expr: ExprId,
receiver: Ty<'db>,
name: Name,
method_with_same_name_exists: bool,
},
UnresolvedMethodCall {
expr: ExprId,
receiver: Ty<'db>,
name: Name,
field_with_same_name: Option<Ty<'db>>,
assoc_func_with_same_name: Option<FunctionId>,
},
UnresolvedAssocItem {
id: ExprOrPatId,
},
UnresolvedIdent {
id: ExprOrPatId,
},
BreakOutsideOfLoop {
expr: ExprId,
is_break: bool,
bad_value_break: bool,
},
MismatchedArgCount {
call_expr: ExprId,
expected: usize,
found: usize,
},
MismatchedTupleStructPatArgCount {
pat: ExprOrPatId,
expected: usize,
found: usize,
},
ExpectedFunction {
call_expr: ExprId,
found: Ty<'db>,
},
TypedHole {
expr: ExprId,
expected: Ty<'db>,
},
CastToUnsized {
expr: ExprId,
cast_ty: Ty<'db>,
},
InvalidCast {
expr: ExprId,
error: CastError,
expr_ty: Ty<'db>,
cast_ty: Ty<'db>,
},
TyDiagnostic {
source: InferenceTyDiagnosticSource,
diag: TyLoweringDiagnostic,
},
PathDiagnostic {
node: ExprOrPatId,
diag: PathLoweringDiagnostic,
},
MethodCallIncorrectGenericsLen {
expr: ExprId,
provided_count: u32,
expected_count: u32,
kind: IncorrectGenericsLenKind,
def: GenericDefId,
},
MethodCallIncorrectGenericsOrder {
expr: ExprId,
param_id: GenericParamId,
arg_idx: u32,
has_self_arg: bool,
},
}Variants§
NoSuchField
PrivateField
PrivateAssocItem
UnresolvedField
UnresolvedMethodCall
UnresolvedAssocItem
Fields
§
id: ExprOrPatIdUnresolvedIdent
Fields
§
id: ExprOrPatIdBreakOutsideOfLoop
MismatchedArgCount
MismatchedTupleStructPatArgCount
ExpectedFunction
TypedHole
CastToUnsized
InvalidCast
TyDiagnostic
PathDiagnostic
MethodCallIncorrectGenericsLen
MethodCallIncorrectGenericsOrder
Trait Implementations§
Source§impl<'db> Clone for InferenceDiagnostic<'db>
impl<'db> Clone for InferenceDiagnostic<'db>
Source§fn clone(&self) -> InferenceDiagnostic<'db>
fn clone(&self) -> InferenceDiagnostic<'db>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'db> Debug for InferenceDiagnostic<'db>
impl<'db> Debug for InferenceDiagnostic<'db>
Source§impl<'db> PartialEq for InferenceDiagnostic<'db>
impl<'db> PartialEq for InferenceDiagnostic<'db>
Source§impl<'db> Update for InferenceDiagnostic<'db>
impl<'db> Update for InferenceDiagnostic<'db>
impl<'db> Eq for InferenceDiagnostic<'db>
impl<'db> StructuralPartialEq for InferenceDiagnostic<'db>
Auto Trait Implementations§
impl<'db> Freeze for InferenceDiagnostic<'db>
impl<'db> RefUnwindSafe for InferenceDiagnostic<'db>
impl<'db> Send for InferenceDiagnostic<'db>
impl<'db> Sync for InferenceDiagnostic<'db>
impl<'db> Unpin for InferenceDiagnostic<'db>
impl<'db> UnwindSafe for InferenceDiagnostic<'db>
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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