pub enum SemanticDiagnosticKind {
Show 112 variants
ModuleFileNotFound {
path: String,
},
Unsupported,
UnknownLiteral,
UnknownBinaryOperator,
UnknownTrait,
UnknownImpl,
UnexpectedElement {
expected: Vec<ElementKind>,
actual: ElementKind,
},
UnknownType,
UnknownEnum,
LiteralError(LiteralError),
NotAVariant,
NotAStruct,
NotAType,
NotATrait,
NotAnImpl,
FunctionNotMemberOfTrait {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
},
UnexpectedGenericArgs,
UnknownMember,
MemberSpecifiedMoreThanOnce,
UseCycle,
TypeAliasCycle,
ImplAliasCycle,
ImplRequirementCycle,
MissingMember {
member_name: SmolStr,
},
WrongNumberOfParameters {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
expected: usize,
actual: usize,
},
WrongNumberOfArguments {
expected: usize,
actual: usize,
},
WrongParameterType {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
expected_ty: TypeId,
actual_ty: TypeId,
},
VariantCtorNotImmutable,
TraitParamMutable {
trait_id: TraitId,
function_id: TraitFunctionId,
},
TraitFunctionWithBody {
trait_id: TraitId,
function_id: TraitFunctionId,
},
ParameterShouldBeReference {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
},
ParameterShouldNotBeReference {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
},
WrongParameterName {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
expected_name: SmolStr,
},
WrongType {
expected_ty: TypeId,
actual_ty: TypeId,
},
WrongArgumentType {
expected_ty: TypeId,
actual_ty: TypeId,
},
WrongReturnType {
expected_ty: TypeId,
actual_ty: TypeId,
},
WrongNumberOfGenericParamsForImplFunction {
expected: usize,
actual: usize,
},
WrongReturnTypeForImpl {
impl_def_id: ImplDefId,
impl_function_id: ImplFunctionId,
trait_id: TraitId,
expected_ty: TypeId,
actual_ty: TypeId,
},
AmbiguousTrait {
trait_function_id0: TraitFunctionId,
trait_function_id1: TraitFunctionId,
},
VariableNotFound {
name: SmolStr,
},
StructMemberRedefinition {
struct_id: StructId,
member_name: SmolStr,
},
EnumVariantRedefinition {
enum_id: EnumId,
variant_name: SmolStr,
},
ParamNameRedefinition {
function_title_id: FunctionTitleId,
param_name: SmolStr,
},
IfConditionNotBool {
condition_ty: TypeId,
},
IncompatibleMatchArms {
match_ty: TypeId,
arm_ty: TypeId,
},
IncompatibleIfBlockTypes {
block_if_ty: TypeId,
block_else_ty: TypeId,
},
IncompatibleLoopBreakTypes {
current_ty: TypeId,
break_ty: TypeId,
},
TypeHasNoMembers {
ty: TypeId,
member_name: SmolStr,
},
NoSuchMethod {
ty: TypeId,
method_name: SmolStr,
},
NoSuchMember {
struct_id: StructId,
member_name: SmolStr,
},
NoSuchVariant {
enum_id: EnumId,
variant_name: SmolStr,
},
IncompatibleErrorPropagateType {
return_ty: TypeId,
err_ty: TypeId,
},
ErrorPropagateOnNonErrorType {
ty: TypeId,
},
ConstGenericParamSupported,
RefArgNotAVariable,
RefArgNotMutable,
RefArgNotExplicit,
ImmutableArgWithModifiers,
AssignmentToImmutableVar,
InvalidLhsForAssignment,
InvalidMemberExpression,
InvalidPath,
PathNotFound(NotFoundItemType),
SuperUsedInRootModule,
RedundantModifier {
current_modifier: SmolStr,
previous_modifier: SmolStr,
},
ReferenceLocalVariable,
UnexpectedEnumPattern {
ty: TypeId,
},
UnexpectedStructPattern {
ty: TypeId,
},
UnexpectedTuplePattern {
ty: TypeId,
},
WrongNumberOfTupleElements {
expected: usize,
actual: usize,
},
WrongEnum {
expected_enum: EnumId,
actual_enum: EnumId,
},
InvalidCopyTraitImpl {
inference_error: InferenceError,
},
InvalidDropTraitImpl {
inference_error: InferenceError,
},
InvalidImplItem {
item_kw: SmolStr,
},
MissingItemsInImpl {
item_names: Vec<SmolStr>,
},
PassPanicAsNopanic {
impl_function_id: ImplFunctionId,
trait_id: TraitId,
},
PanicableFromNonPanicable,
PanicableExternFunction,
PluginDiagnostic(PluginDiagnostic),
WrappedPluginDiagnostic {
file_id: FileId,
diagnostic: PluginMappedDiagnostic,
original_diag: Box<SemanticDiagnostic>,
},
NameDefinedMultipleTimes {
name: SmolStr,
},
NamedArgumentsAreNotSupported,
UnnamedArgumentFollowsNamed,
NamedArgumentMismatch {
expected: SmolStr,
found: SmolStr,
},
UnsupportedOutsideOfFunction {
feature_name: UnsupportedOutsideOfFunctionFeatureName,
},
OnlyLiteralConstants,
ExternItemWithImplGenericsNotSupported,
MissingSemicolon,
TraitMismatch {
expected_trt: ConcreteTraitId,
actual_trt: ConcreteTraitId,
},
DesnapNonSnapshot,
InternalInferenceError(InferenceError),
NoImplementationOfIndexOperator(TypeId),
MultipleImplementationOfIndexOperator(TypeId),
UnsupportedInlineArguments,
RedundantInlineAttribute,
InlineAttrForExternFunctionNotAllowed,
InlineAlwaysWithImplGenericArgNotAllowed,
TailExpressionNotAllowedInLoop,
ContinueOnlyAllowedInsideALoop,
BreakOnlyAllowedInsideALoop,
ReturnNotAllowedInsideALoop,
ErrorPropagateNotAllowedInsideALoop,
ImplicitPrecedenceAttrForExternFunctionNotAllowed,
RedundantImplicitPrecedenceAttribute,
UnsupportedImplicitPrecedenceArguments,
InlineMacroNotFound {
macro_name: SmolStr,
},
InlineMacroFailed {
macro_name: SmolStr,
},
UnknownGenericParam {
name: SmolStr,
},
PositionalGenericAfterNamed,
GenericArgDuplicate {
name: SmolStr,
},
TooManyGenericArguments {
expected: usize,
actual: usize,
},
GenericArgOutOfOrder {
name: SmolStr,
},
}
Variants§
ModuleFileNotFound
Unsupported
UnknownLiteral
UnknownBinaryOperator
UnknownTrait
UnknownImpl
UnexpectedElement
UnknownType
UnknownEnum
LiteralError(LiteralError)
NotAVariant
NotAStruct
NotAType
NotATrait
NotAnImpl
FunctionNotMemberOfTrait
UnexpectedGenericArgs
UnknownMember
MemberSpecifiedMoreThanOnce
UseCycle
TypeAliasCycle
ImplAliasCycle
ImplRequirementCycle
MissingMember
WrongNumberOfParameters
Fields
§
impl_function_id: ImplFunctionId
WrongNumberOfArguments
WrongParameterType
Fields
§
impl_function_id: ImplFunctionId
VariantCtorNotImmutable
TraitParamMutable
TraitFunctionWithBody
ParameterShouldBeReference
ParameterShouldNotBeReference
WrongParameterName
Fields
§
impl_function_id: ImplFunctionId
WrongType
WrongArgumentType
WrongReturnType
WrongNumberOfGenericParamsForImplFunction
WrongReturnTypeForImpl
Fields
§
impl_function_id: ImplFunctionId
AmbiguousTrait
VariableNotFound
StructMemberRedefinition
EnumVariantRedefinition
ParamNameRedefinition
IfConditionNotBool
IncompatibleMatchArms
IncompatibleIfBlockTypes
IncompatibleLoopBreakTypes
TypeHasNoMembers
NoSuchMethod
NoSuchMember
NoSuchVariant
IncompatibleErrorPropagateType
ErrorPropagateOnNonErrorType
ConstGenericParamSupported
RefArgNotAVariable
RefArgNotMutable
RefArgNotExplicit
ImmutableArgWithModifiers
AssignmentToImmutableVar
InvalidLhsForAssignment
InvalidMemberExpression
InvalidPath
PathNotFound(NotFoundItemType)
SuperUsedInRootModule
RedundantModifier
ReferenceLocalVariable
UnexpectedEnumPattern
UnexpectedStructPattern
UnexpectedTuplePattern
WrongNumberOfTupleElements
WrongEnum
InvalidCopyTraitImpl
Fields
§
inference_error: InferenceError
InvalidDropTraitImpl
Fields
§
inference_error: InferenceError
InvalidImplItem
MissingItemsInImpl
PassPanicAsNopanic
PanicableFromNonPanicable
PanicableExternFunction
PluginDiagnostic(PluginDiagnostic)
WrappedPluginDiagnostic
NameDefinedMultipleTimes
NamedArgumentsAreNotSupported
UnnamedArgumentFollowsNamed
NamedArgumentMismatch
UnsupportedOutsideOfFunction
Fields
§
feature_name: UnsupportedOutsideOfFunctionFeatureName
OnlyLiteralConstants
ExternItemWithImplGenericsNotSupported
MissingSemicolon
TraitMismatch
DesnapNonSnapshot
InternalInferenceError(InferenceError)
NoImplementationOfIndexOperator(TypeId)
MultipleImplementationOfIndexOperator(TypeId)
UnsupportedInlineArguments
RedundantInlineAttribute
InlineAttrForExternFunctionNotAllowed
InlineAlwaysWithImplGenericArgNotAllowed
TailExpressionNotAllowedInLoop
ContinueOnlyAllowedInsideALoop
BreakOnlyAllowedInsideALoop
ReturnNotAllowedInsideALoop
ErrorPropagateNotAllowedInsideALoop
ImplicitPrecedenceAttrForExternFunctionNotAllowed
RedundantImplicitPrecedenceAttribute
UnsupportedImplicitPrecedenceArguments
InlineMacroNotFound
InlineMacroFailed
UnknownGenericParam
PositionalGenericAfterNamed
GenericArgDuplicate
TooManyGenericArguments
GenericArgOutOfOrder
Trait Implementations§
source§impl Clone for SemanticDiagnosticKind
impl Clone for SemanticDiagnosticKind
source§fn clone(&self) -> SemanticDiagnosticKind
fn clone(&self) -> SemanticDiagnosticKind
Returns a copy 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 Debug for SemanticDiagnosticKind
impl Debug for SemanticDiagnosticKind
source§impl Hash for SemanticDiagnosticKind
impl Hash for SemanticDiagnosticKind
source§impl PartialEq for SemanticDiagnosticKind
impl PartialEq for SemanticDiagnosticKind
source§fn eq(&self, other: &SemanticDiagnosticKind) -> bool
fn eq(&self, other: &SemanticDiagnosticKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SemanticDiagnosticKind
impl StructuralEq for SemanticDiagnosticKind
impl StructuralPartialEq for SemanticDiagnosticKind
Auto Trait Implementations§
impl RefUnwindSafe for SemanticDiagnosticKind
impl Send for SemanticDiagnosticKind
impl Sync for SemanticDiagnosticKind
impl Unpin for SemanticDiagnosticKind
impl UnwindSafe for SemanticDiagnosticKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§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<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.