pub enum SemanticDiagnosticKind {
Show 124 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,
},
MissingVariableInPattern,
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,
},
CannotCallMethod {
ty: TypeId,
method_name: SmolStr,
inference_errors: TraitInferenceErrors,
},
NoSuchMember {
struct_id: StructId,
member_name: SmolStr,
},
MemberNotVisible {
member_name: SmolStr,
},
NoSuchVariant {
enum_id: EnumId,
variant_name: SmolStr,
},
IncompatibleErrorPropagateType {
return_ty: TypeId,
err_ty: TypeId,
},
ErrorPropagateOnNonErrorType {
ty: TypeId,
},
UnhandledMustUseType {
ty: TypeId,
},
UnhandledMustUseFunction,
UnusedVariable,
ConstGenericParamNotSupported,
NegativeImplsNotEnabled,
NegativeImplsOnlyOnImpls,
RefArgNotAVariable,
RefArgNotMutable,
RefArgNotExplicit,
ImmutableArgWithModifiers,
AssignmentToImmutableVar,
InvalidLhsForAssignment,
InvalidMemberExpression,
InvalidPath,
PathNotFound(NotFoundItemType),
SuperUsedInRootModule,
ItemNotVisible {
item_id: ModuleItemId,
},
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),
NameDefinedMultipleTimes {
name: SmolStr,
},
NamedArgumentsAreNotSupported,
ArgPassedToNegativeImpl,
UnnamedArgumentFollowsNamed,
NamedArgumentMismatch {
expected: SmolStr,
found: SmolStr,
},
UnsupportedOutsideOfFunction {
feature_name: UnsupportedOutsideOfFunctionFeatureName,
},
OnlyLiteralConstants,
ExternItemWithImplGenericsNotSupported,
MissingSemicolon,
TraitMismatch {
expected_trt: ConcreteTraitId,
actual_trt: ConcreteTraitId,
},
DesnapNonSnapshot,
InternalInferenceError(InferenceError),
NoImplementationOfIndexOperator {
ty: TypeId,
inference_errors: TraitInferenceErrors,
},
MultipleImplementationOfIndexOperator(TypeId),
UnsupportedInlineArguments,
RedundantInlineAttribute,
InlineAttrForExternFunctionNotAllowed,
InlineAlwaysWithImplGenericArgNotAllowed,
TailExpressionNotAllowedInLoop,
ContinueOnlyAllowedInsideALoop,
BreakOnlyAllowedInsideALoop,
ReturnNotAllowedInsideALoop,
ErrorPropagateNotAllowedInsideALoop,
ImplicitPrecedenceAttrForExternFunctionNotAllowed,
RedundantImplicitPrecedenceAttribute,
UnsupportedImplicitPrecedenceArguments,
UnsupportedPubArgument,
UnknownStatementAttribute,
InlineMacroNotFound {
macro_name: SmolStr,
},
InlineMacroFailed {
macro_name: SmolStr,
},
UnknownGenericParam {
name: SmolStr,
},
PositionalGenericAfterNamed,
GenericArgDuplicate {
name: SmolStr,
},
TooManyGenericArguments {
expected: usize,
actual: usize,
},
GenericArgOutOfOrder {
name: SmolStr,
},
UnsupportedTraitItem {
kind: String,
},
UnsupportedImplItem {
kind: String,
},
}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: ImplFunctionIdWrongNumberOfArguments
WrongParameterType
Fields
§
impl_function_id: ImplFunctionIdVariantCtorNotImmutable
TraitParamMutable
TraitFunctionWithBody
ParameterShouldBeReference
ParameterShouldNotBeReference
WrongParameterName
Fields
§
impl_function_id: ImplFunctionIdWrongType
WrongArgumentType
WrongReturnType
WrongNumberOfGenericParamsForImplFunction
WrongReturnTypeForImpl
Fields
§
impl_function_id: ImplFunctionIdAmbiguousTrait
VariableNotFound
MissingVariableInPattern
StructMemberRedefinition
EnumVariantRedefinition
ParamNameRedefinition
IfConditionNotBool
IncompatibleMatchArms
IncompatibleIfBlockTypes
IncompatibleLoopBreakTypes
TypeHasNoMembers
CannotCallMethod
NoSuchMember
MemberNotVisible
NoSuchVariant
IncompatibleErrorPropagateType
ErrorPropagateOnNonErrorType
UnhandledMustUseType
UnhandledMustUseFunction
UnusedVariable
ConstGenericParamNotSupported
NegativeImplsNotEnabled
NegativeImplsOnlyOnImpls
RefArgNotAVariable
RefArgNotMutable
RefArgNotExplicit
ImmutableArgWithModifiers
AssignmentToImmutableVar
InvalidLhsForAssignment
InvalidMemberExpression
InvalidPath
PathNotFound(NotFoundItemType)
SuperUsedInRootModule
ItemNotVisible
Fields
§
item_id: ModuleItemIdRedundantModifier
ReferenceLocalVariable
UnexpectedEnumPattern
UnexpectedStructPattern
UnexpectedTuplePattern
WrongNumberOfTupleElements
WrongEnum
InvalidCopyTraitImpl
Fields
§
inference_error: InferenceErrorInvalidDropTraitImpl
Fields
§
inference_error: InferenceErrorInvalidImplItem
MissingItemsInImpl
PassPanicAsNopanic
PanicableFromNonPanicable
PanicableExternFunction
PluginDiagnostic(PluginDiagnostic)
NameDefinedMultipleTimes
NamedArgumentsAreNotSupported
ArgPassedToNegativeImpl
UnnamedArgumentFollowsNamed
NamedArgumentMismatch
UnsupportedOutsideOfFunction
Fields
§
feature_name: UnsupportedOutsideOfFunctionFeatureNameOnlyLiteralConstants
ExternItemWithImplGenericsNotSupported
MissingSemicolon
TraitMismatch
DesnapNonSnapshot
InternalInferenceError(InferenceError)
NoImplementationOfIndexOperator
MultipleImplementationOfIndexOperator(TypeId)
UnsupportedInlineArguments
RedundantInlineAttribute
InlineAttrForExternFunctionNotAllowed
InlineAlwaysWithImplGenericArgNotAllowed
TailExpressionNotAllowedInLoop
ContinueOnlyAllowedInsideALoop
BreakOnlyAllowedInsideALoop
ReturnNotAllowedInsideALoop
ErrorPropagateNotAllowedInsideALoop
ImplicitPrecedenceAttrForExternFunctionNotAllowed
RedundantImplicitPrecedenceAttribute
UnsupportedImplicitPrecedenceArguments
UnsupportedPubArgument
UnknownStatementAttribute
InlineMacroNotFound
InlineMacroFailed
UnknownGenericParam
PositionalGenericAfterNamed
GenericArgDuplicate
TooManyGenericArguments
GenericArgOutOfOrder
UnsupportedTraitItem
UnsupportedImplItem
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.