pub enum CheckError {
Show 18 variants
UnresolvedRef {
name: String,
location: Option<String>,
suggestions: Vec<String>,
},
DeriveFailed {
target: String,
trait_name: String,
missing_impls: Vec<String>,
},
TypeNotFound {
type_name: String,
},
TraitNotImplemented {
type_name: String,
trait_name: String,
},
SimultaneousMutBorrow {
variable: String,
first_borrow_line: u32,
second_borrow_line: u32,
},
BorrowConflict {
variable: String,
existing_kind: String,
existing_line: u32,
new_kind: String,
new_line: u32,
},
UseAfterMove {
variable: String,
moved_at: u32,
used_at: u32,
},
DanglingReference {
reference: String,
source: String,
dropped_at: u32,
used_at: u32,
},
CannotMutateThroughSharedRef {
variable: String,
at_line: u32,
},
FieldNotFound {
type_name: String,
field_name: String,
available_fields: Vec<String>,
},
MethodNotFound {
type_name: String,
method_name: String,
available_methods: Vec<String>,
},
EnumVariantNotFound {
enum_name: String,
variant_name: String,
available_variants: Vec<String>,
},
MissingRequiredField {
struct_name: String,
missing_fields: Vec<String>,
},
ArgumentCountMismatch {
function_name: String,
expected: usize,
actual: usize,
},
AmbiguousTarget {
name: String,
candidates: Vec<String>,
},
TypeImpact {
description: String,
details: String,
},
ReferenceIntegrity {
description: String,
details: String,
},
Other {
message: String,
},
}Expand description
Error from a light check.
Variants§
UnresolvedRef
Unresolved symbol reference.
Fields
DeriveFailed
Derive macro cannot be applied.
Fields
TypeNotFound
Type not found in registry.
TraitNotImplemented
Trait not implemented for type.
Fields
SimultaneousMutBorrow
Simultaneous mutable borrows of the same variable.
Fields
BorrowConflict
Conflict between mutable and shared borrows.
Fields
UseAfterMove
Use of a variable after it has been moved.
Fields
DanglingReference
Dangling reference (reference to dropped value).
Fields
Cannot mutate through a shared reference.
FieldNotFound
Field not found on a type.
Fields
MethodNotFound
Method not found on a type.
Fields
EnumVariantNotFound
Enum variant not found.
Fields
MissingRequiredField
Missing required field in struct literal.
ArgumentCountMismatch
Function argument count mismatch.
Fields
AmbiguousTarget
Ambiguous target - multiple symbols match the given name.
Fields
TypeImpact
Type change has impact on other parts of the codebase.
Fields
ReferenceIntegrity
Reference integrity issue (dangling references, missing fields, etc.).
Fields
Other
Generic check failure.
Implementations§
Source§impl CheckError
impl CheckError
Sourcepub fn unresolved(name: impl Into<String>) -> Self
pub fn unresolved(name: impl Into<String>) -> Self
Create an unresolved reference error.
Sourcepub fn unresolved_at(
name: impl Into<String>,
location: impl Into<String>,
) -> Self
pub fn unresolved_at( name: impl Into<String>, location: impl Into<String>, ) -> Self
Create an unresolved reference error with location.
Sourcepub fn type_not_found(type_name: impl Into<String>) -> Self
pub fn type_not_found(type_name: impl Into<String>) -> Self
Create a type not found error.
Sourcepub fn derive_failed(
target: impl Into<String>,
trait_name: impl Into<String>,
missing_impls: Vec<String>,
) -> Self
pub fn derive_failed( target: impl Into<String>, trait_name: impl Into<String>, missing_impls: Vec<String>, ) -> Self
Create a derive failed error.
Sourcepub fn trait_not_impl(
type_name: impl Into<String>,
trait_name: impl Into<String>,
) -> Self
pub fn trait_not_impl( type_name: impl Into<String>, trait_name: impl Into<String>, ) -> Self
Create a trait not implemented error.
Sourcepub fn simultaneous_mut_borrow(
variable: impl Into<String>,
first_borrow_line: u32,
second_borrow_line: u32,
) -> Self
pub fn simultaneous_mut_borrow( variable: impl Into<String>, first_borrow_line: u32, second_borrow_line: u32, ) -> Self
Create a simultaneous mutable borrow error.
Sourcepub fn borrow_conflict(
variable: impl Into<String>,
existing_kind: impl Into<String>,
existing_line: u32,
new_kind: impl Into<String>,
new_line: u32,
) -> Self
pub fn borrow_conflict( variable: impl Into<String>, existing_kind: impl Into<String>, existing_line: u32, new_kind: impl Into<String>, new_line: u32, ) -> Self
Create a borrow conflict error.
Sourcepub fn use_after_move(
variable: impl Into<String>,
moved_at: u32,
used_at: u32,
) -> Self
pub fn use_after_move( variable: impl Into<String>, moved_at: u32, used_at: u32, ) -> Self
Create a use after move error.
Sourcepub fn dangling_reference(
reference: impl Into<String>,
source: impl Into<String>,
dropped_at: u32,
used_at: u32,
) -> Self
pub fn dangling_reference( reference: impl Into<String>, source: impl Into<String>, dropped_at: u32, used_at: u32, ) -> Self
Create a dangling reference error.
Create a cannot mutate through shared ref error.
Sourcepub fn field_not_found(
type_name: impl Into<String>,
field_name: impl Into<String>,
available_fields: Vec<String>,
) -> Self
pub fn field_not_found( type_name: impl Into<String>, field_name: impl Into<String>, available_fields: Vec<String>, ) -> Self
Create a field not found error.
Sourcepub fn method_not_found(
type_name: impl Into<String>,
method_name: impl Into<String>,
available_methods: Vec<String>,
) -> Self
pub fn method_not_found( type_name: impl Into<String>, method_name: impl Into<String>, available_methods: Vec<String>, ) -> Self
Create a method not found error.
Sourcepub fn variant_not_found(
enum_name: impl Into<String>,
variant_name: impl Into<String>,
available_variants: Vec<String>,
) -> Self
pub fn variant_not_found( enum_name: impl Into<String>, variant_name: impl Into<String>, available_variants: Vec<String>, ) -> Self
Create an enum variant not found error.
Sourcepub fn missing_fields(
struct_name: impl Into<String>,
missing_fields: Vec<String>,
) -> Self
pub fn missing_fields( struct_name: impl Into<String>, missing_fields: Vec<String>, ) -> Self
Create a missing required field error.
Sourcepub fn arg_count_mismatch(
function_name: impl Into<String>,
expected: usize,
actual: usize,
) -> Self
pub fn arg_count_mismatch( function_name: impl Into<String>, expected: usize, actual: usize, ) -> Self
Create an argument count mismatch error.
Sourcepub fn ambiguous_target(
name: impl Into<String>,
candidates: Vec<String>,
) -> Self
pub fn ambiguous_target( name: impl Into<String>, candidates: Vec<String>, ) -> Self
Create an ambiguous target error.
Trait Implementations§
Source§impl Clone for CheckError
impl Clone for CheckError
Source§fn clone(&self) -> CheckError
fn clone(&self) -> CheckError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckError
impl Debug for CheckError
Source§impl Display for CheckError
impl Display for CheckError
Source§impl Error for CheckError
impl Error for CheckError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CheckError
impl RefUnwindSafe for CheckError
impl Send for CheckError
impl Sync for CheckError
impl Unpin for CheckError
impl UnsafeUnpin for CheckError
impl UnwindSafe for CheckError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more