pub enum TypeError {
Show 25 variants
Unification(String, String),
Occurs(TypeVarId, String),
UnknownClass(Symbol),
NoInstance(Symbol, String),
UnknownTypeName(Symbol),
ReservedTypeName(Symbol),
DuplicateValue(Symbol),
DuplicateClass(Symbol),
InvalidClassArity {
class: Symbol,
got: usize,
},
DuplicateClassMethod(Symbol),
UnknownInstanceMethod {
class: Symbol,
method: Symbol,
},
MissingInstanceMethod {
class: Symbol,
method: Symbol,
},
MissingInstanceConstraint {
method: Symbol,
class: Symbol,
typ: String,
},
UnknownVar(Symbol),
AmbiguousOverload(Symbol),
AmbiguousTypeVars {
vars: Vec<TypeVarId>,
constraints: String,
},
KindMismatch {
class: Symbol,
expected: usize,
got: usize,
typ: String,
},
MissingConstraints {
constraints: String,
},
UnsupportedExpr(&'static str),
UnknownField {
field: Symbol,
typ: String,
},
FieldNotKnown {
field: Symbol,
typ: String,
},
NonExhaustiveMatch {
typ: String,
missing: Vec<Symbol>,
},
Spanned {
span: Span,
error: Box<TypeError>,
},
Internal(String),
OutOfGas(OutOfGas),
}Variants§
Unification(String, String)
Occurs(TypeVarId, String)
UnknownClass(Symbol)
NoInstance(Symbol, String)
UnknownTypeName(Symbol)
ReservedTypeName(Symbol)
DuplicateValue(Symbol)
DuplicateClass(Symbol)
InvalidClassArity
DuplicateClassMethod(Symbol)
UnknownInstanceMethod
MissingInstanceMethod
MissingInstanceConstraint
UnknownVar(Symbol)
AmbiguousOverload(Symbol)
AmbiguousTypeVars
KindMismatch
MissingConstraints
UnsupportedExpr(&'static str)
UnknownField
FieldNotKnown
NonExhaustiveMatch
Spanned
Internal(String)
OutOfGas(OutOfGas)
Trait Implementations§
Source§impl Error for TypeError
impl Error for TypeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for TypeError
impl StructuralPartialEq for TypeError
Auto Trait Implementations§
impl Freeze for TypeError
impl RefUnwindSafe for TypeError
impl Send for TypeError
impl Sync for TypeError
impl Unpin for TypeError
impl UnsafeUnpin for TypeError
impl UnwindSafe for TypeError
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