pub enum RustSemaError {
Show 13 variants
UnresolvedName {
name: String,
offset: u32,
},
UnknownFunction {
name: String,
offset: u32,
},
CannotBorrowImmutableAsMutable {
name: String,
offset: u32,
},
ReturnsReferenceToLocal {
offset: u32,
},
MultipleMutableBorrows {
offset: u32,
},
MutableAndSharedBorrow {
offset: u32,
},
TypeMismatch {
context: String,
expected: String,
found: String,
},
CannotDeref {
found: String,
},
NonBooleanCondition {
found: String,
},
ArgCountMismatch {
function: String,
expected: usize,
found: usize,
},
MissingReturn {
function: String,
expected: String,
},
AssignToImmutable {
name: String,
},
InternalInvariant {
message: String,
},
}Expand description
Errors from the Rust semantic-analysis stages.
Variants§
UnresolvedName
A variable use did not resolve to any in-scope binding (rustc E0425).
UnknownFunction
A call referenced a function that is not defined (rustc E0425).
CannotBorrowImmutableAsMutable
A &mut borrow targeted an immutable place (rustc E0596).
Fields
ReturnsReferenceToLocal
A function returned a reference to a call-local value (rustc E0597).
MultipleMutableBorrows
Two mutable borrows of the same place are live simultaneously (rustc E0499).
A mutable and a shared borrow of the same place are live at once (rustc E0502).
TypeMismatch
An expression’s type did not match the expected type (rustc E0308).
Fields
CannotDeref
A dereference was applied to a non-reference type (rustc E0614).
NonBooleanCondition
An if condition was not bool (rustc E0308).
ArgCountMismatch
A call passed the wrong number of arguments (rustc E0061).
Fields
MissingReturn
A non-unit function body does not return on all paths (rustc E0308).
AssignToImmutable
Assignment to a binding not declared mut (rustc E0384).
InternalInvariant
Internal pass invariant failed.
Trait Implementations§
Source§impl Clone for RustSemaError
impl Clone for RustSemaError
Source§fn clone(&self) -> RustSemaError
fn clone(&self) -> RustSemaError
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 RustSemaError
impl Debug for RustSemaError
Source§impl Display for RustSemaError
impl Display for RustSemaError
Source§impl Error for RustSemaError
impl Error for RustSemaError
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 RustSemaError
impl RefUnwindSafe for RustSemaError
impl Send for RustSemaError
impl Sync for RustSemaError
impl Unpin for RustSemaError
impl UnsafeUnpin for RustSemaError
impl UnwindSafe for RustSemaError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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 more