pub enum SemanticDiagnosticKind {
Show 182 variants
ModuleFileNotFound(String),
Unsupported,
UnknownLiteral,
UnknownBinaryOperator,
UnknownTrait,
UnknownImpl,
UnexpectedElement {
expected: Vec<ElementKind>,
actual: ElementKind,
},
UnknownType,
UnknownEnum,
LiteralError(LiteralError),
NotAVariant,
NotAStruct,
NotAType,
NotATrait,
NotAnImpl,
ImplItemNotInTrait {
impl_def_id: ImplDefId,
impl_item_name: SmolStr,
trait_id: TraitId,
item_kind: String,
},
ImplicitImplNotInferred {
trait_impl_id: TraitImplId,
concrete_trait_id: ConcreteTraitId,
},
GenericsNotSupportedInItem {
scope: String,
item_kind: String,
},
UnexpectedGenericArgs,
UnknownMember,
CannotCreateInstancesOfPhantomTypes,
NonPhantomTypeContainingPhantomType,
MemberSpecifiedMoreThanOnce,
StructBaseStructExpressionNotLast,
StructBaseStructExpressionNoEffect,
ConstCycle,
UseCycle,
TypeAliasCycle,
ImplAliasCycle,
ImplRequirementCycle,
MissingMember(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,
},
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,
},
InconsistentBinding,
WrongArgumentType {
expected_ty: TypeId,
actual_ty: TypeId,
},
WrongReturnType {
expected_ty: TypeId,
actual_ty: TypeId,
},
WrongExprType {
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(SmolStr),
MissingVariableInPattern,
StructMemberRedefinition {
struct_id: StructId,
member_name: SmolStr,
},
EnumVariantRedefinition {
enum_id: EnumId,
variant_name: SmolStr,
},
InfiniteSizeType(TypeId),
ArrayOfZeroSizedElements(TypeId),
ParamNameRedefinition {
function_title_id: Option<FunctionTitleId>,
param_name: SmolStr,
},
ConditionNotBool(TypeId),
IncompatibleArms {
multi_arm_expr_kind: MultiArmExprKind,
pending_ty: TypeId,
different_ty: TypeId,
},
LogicalOperatorNotAllowedInIfLet,
LogicalOperatorNotAllowedInWhileLet,
TypeHasNoMembers {
ty: TypeId,
member_name: SmolStr,
},
CannotCallMethod {
ty: TypeId,
method_name: SmolStr,
inference_errors: TraitInferenceErrors,
},
NoSuchStructMember {
struct_id: StructId,
member_name: SmolStr,
},
NoSuchTypeMember {
ty: TypeId,
member_name: SmolStr,
},
MemberNotVisible(SmolStr),
NoSuchVariant {
enum_id: EnumId,
variant_name: SmolStr,
},
ReturnTypeNotErrorPropagateType,
IncompatibleErrorPropagateType {
return_ty: TypeId,
err_ty: TypeId,
},
ErrorPropagateOnNonErrorType(TypeId),
UnhandledMustUseType(TypeId),
UnstableFeature {
feature_name: SmolStr,
note: Option<SmolStr>,
},
DeprecatedFeature {
feature_name: SmolStr,
note: Option<SmolStr>,
},
InternalFeature {
feature_name: SmolStr,
note: Option<SmolStr>,
},
FeatureMarkerDiagnostic(FeatureMarkerDiagnostic),
UnhandledMustUseFunction,
UnusedVariable,
UnusedConstant,
UnusedUse,
MultipleConstantDefinition(SmolStr),
MultipleDefinitionforBinding(SmolStr),
MultipleGenericItemDefinition(SmolStr),
UnsupportedUseItemInStatement,
ConstGenericParamNotSupported,
NegativeImplsNotEnabled,
NegativeImplsOnlyOnImpls,
RefArgNotAVariable,
RefArgNotMutable,
RefArgNotExplicit,
ImmutableArgWithModifiers,
AssignmentToImmutableVar,
InvalidLhsForAssignment,
InvalidMemberExpression,
InvalidPath,
PathNotFound(NotFoundItemType),
AmbiguousPath(Vec<ModuleItemId>),
UseStarEmptyPath,
GlobalUsesNotSupportedInEdition(Edition),
TraitInTraitMustBeExplicit,
ImplInImplMustBeExplicit,
TraitItemForbiddenInTheTrait,
TraitItemForbiddenInItsImpl,
ImplItemForbiddenInTheImpl,
SuperUsedInRootModule,
ItemNotVisible(ModuleItemId, Vec<ModuleId>),
UnusedImport(UseId),
RedundantModifier {
current_modifier: SmolStr,
previous_modifier: SmolStr,
},
ReferenceLocalVariable,
UnexpectedEnumPattern(TypeId),
UnexpectedStructPattern(TypeId),
UnexpectedTuplePattern(TypeId),
UnexpectedFixedSizeArrayPattern(TypeId),
WrongNumberOfTupleElements {
expected: usize,
actual: usize,
},
WrongNumberOfFixedSizeArrayElements {
expected: usize,
actual: usize,
},
WrongEnum {
expected_enum: EnumId,
actual_enum: EnumId,
},
InvalidCopyTraitImpl(InferenceError),
InvalidDropTraitImpl(InferenceError),
InvalidImplItem(SmolStr),
MissingItemsInImpl(Vec<SmolStr>),
PassPanicAsNopanic {
impl_function_id: ImplFunctionId,
trait_id: TraitId,
},
PanicableFromNonPanicable,
PanicableExternFunction,
PluginDiagnostic(PluginDiagnostic),
NameDefinedMultipleTimes(SmolStr),
NonPrivateUseStar,
NamedArgumentsAreNotSupported,
ArgPassedToNegativeImpl,
UnnamedArgumentFollowsNamed,
NamedArgumentMismatch {
expected: SmolStr,
found: SmolStr,
},
UnsupportedOutsideOfFunction(UnsupportedOutsideOfFunctionFeatureName),
UnsupportedConstant,
DivisionByZero,
ExternTypeWithImplGenericsNotSupported,
MissingSemicolon,
TraitMismatch {
expected_trt: ConcreteTraitId,
actual_trt: ConcreteTraitId,
},
DesnapNonSnapshot,
InternalInferenceError(InferenceError),
NoImplementationOfIndexOperator {
ty: TypeId,
inference_errors: TraitInferenceErrors,
},
NoImplementationOfTrait {
ty: TypeId,
trait_name: SmolStr,
inference_errors: TraitInferenceErrors,
},
CallExpressionRequiresFunction {
ty: TypeId,
inference_errors: TraitInferenceErrors,
},
MultipleImplementationOfIndexOperator(TypeId),
UnsupportedInlineArguments,
RedundantInlineAttribute,
InlineAttrForExternFunctionNotAllowed,
InlineAlwaysWithImplGenericArgNotAllowed,
TailExpressionNotAllowedInLoop,
ContinueOnlyAllowedInsideALoop,
BreakOnlyAllowedInsideALoop,
BreakWithValueOnlyAllowedInsideALoop,
ReturnNotAllowedInsideALoop,
ErrorPropagateNotAllowedInsideALoop,
ImplicitPrecedenceAttrForExternFunctionNotAllowed,
RedundantImplicitPrecedenceAttribute,
UnsupportedImplicitPrecedenceArguments,
UnsupportedFeatureAttrArguments,
UnsupportedAllowAttrArguments,
UnsupportedPubArgument,
UnknownStatementAttribute,
InlineMacroNotFound(SmolStr),
InlineMacroFailed(SmolStr),
UnknownGenericParam(SmolStr),
PositionalGenericAfterNamed,
GenericArgDuplicate(SmolStr),
TooManyGenericArguments {
expected: usize,
actual: usize,
},
GenericArgOutOfOrder(SmolStr),
CouponForExternFunctionNotAllowed,
CouponArgumentNoModifiers,
CouponsDisabled,
FixedSizeArrayTypeNonSingleType,
FixedSizeArrayTypeEmptySize,
FixedSizeArrayNonNumericSize,
FixedSizeArrayNonSingleValue,
FixedSizeArraySizeTooBig,
SelfNotSupportedInContext,
SelfMustBeFirst,
DerefCycle {
deref_chain: String,
},
CompilerTraitReImplementation {
trait_id: TraitId,
},
ClosureInGlobalScope,
MaybeMissingColonColon,
CallingShadowedFunction {
shadowed_function_name: SmolStr,
},
RefClosureArgument,
MutableCapturedVariable,
NonTraitTypeConstrained {
identifier: SmolStr,
concrete_trait_id: ConcreteTraitId,
},
DuplicateTypeConstraint {
concrete_trait_type_id: ConcreteTraitTypeId,
},
TypeConstraintsSyntaxNotEnabled,
}
Variants§
ModuleFileNotFound(String)
Unsupported
UnknownLiteral
UnknownBinaryOperator
UnknownTrait
UnknownImpl
UnexpectedElement
UnknownType
UnknownEnum
LiteralError(LiteralError)
NotAVariant
NotAStruct
NotAType
NotATrait
NotAnImpl
ImplItemNotInTrait
ImplicitImplNotInferred
GenericsNotSupportedInItem
UnexpectedGenericArgs
UnknownMember
CannotCreateInstancesOfPhantomTypes
NonPhantomTypeContainingPhantomType
MemberSpecifiedMoreThanOnce
StructBaseStructExpressionNotLast
StructBaseStructExpressionNoEffect
ConstCycle
UseCycle
TypeAliasCycle
ImplAliasCycle
ImplRequirementCycle
MissingMember(SmolStr)
WrongNumberOfParameters
Fields
§
impl_function_id: ImplFunctionId
WrongNumberOfArguments
WrongParameterType
Fields
§
impl_function_id: ImplFunctionId
VariantCtorNotImmutable
TraitParamMutable
ParameterShouldBeReference
ParameterShouldNotBeReference
WrongParameterName
Fields
§
impl_function_id: ImplFunctionId
WrongType
InconsistentBinding
WrongArgumentType
WrongReturnType
WrongExprType
WrongNumberOfGenericParamsForImplFunction
WrongReturnTypeForImpl
Fields
§
impl_function_id: ImplFunctionId
AmbiguousTrait
VariableNotFound(SmolStr)
MissingVariableInPattern
StructMemberRedefinition
EnumVariantRedefinition
InfiniteSizeType(TypeId)
ArrayOfZeroSizedElements(TypeId)
ParamNameRedefinition
ConditionNotBool(TypeId)
IncompatibleArms
LogicalOperatorNotAllowedInIfLet
LogicalOperatorNotAllowedInWhileLet
TypeHasNoMembers
CannotCallMethod
NoSuchStructMember
NoSuchTypeMember
MemberNotVisible(SmolStr)
NoSuchVariant
ReturnTypeNotErrorPropagateType
IncompatibleErrorPropagateType
ErrorPropagateOnNonErrorType(TypeId)
UnhandledMustUseType(TypeId)
UnstableFeature
DeprecatedFeature
InternalFeature
FeatureMarkerDiagnostic(FeatureMarkerDiagnostic)
UnhandledMustUseFunction
UnusedVariable
UnusedConstant
UnusedUse
MultipleConstantDefinition(SmolStr)
MultipleDefinitionforBinding(SmolStr)
MultipleGenericItemDefinition(SmolStr)
UnsupportedUseItemInStatement
ConstGenericParamNotSupported
NegativeImplsNotEnabled
NegativeImplsOnlyOnImpls
RefArgNotAVariable
RefArgNotMutable
RefArgNotExplicit
ImmutableArgWithModifiers
AssignmentToImmutableVar
InvalidLhsForAssignment
InvalidMemberExpression
InvalidPath
PathNotFound(NotFoundItemType)
AmbiguousPath(Vec<ModuleItemId>)
UseStarEmptyPath
GlobalUsesNotSupportedInEdition(Edition)
TraitInTraitMustBeExplicit
ImplInImplMustBeExplicit
TraitItemForbiddenInTheTrait
TraitItemForbiddenInItsImpl
ImplItemForbiddenInTheImpl
SuperUsedInRootModule
ItemNotVisible(ModuleItemId, Vec<ModuleId>)
UnusedImport(UseId)
RedundantModifier
ReferenceLocalVariable
UnexpectedEnumPattern(TypeId)
UnexpectedStructPattern(TypeId)
UnexpectedTuplePattern(TypeId)
UnexpectedFixedSizeArrayPattern(TypeId)
WrongNumberOfTupleElements
WrongNumberOfFixedSizeArrayElements
WrongEnum
InvalidCopyTraitImpl(InferenceError)
InvalidDropTraitImpl(InferenceError)
InvalidImplItem(SmolStr)
MissingItemsInImpl(Vec<SmolStr>)
PassPanicAsNopanic
PanicableFromNonPanicable
PanicableExternFunction
PluginDiagnostic(PluginDiagnostic)
NameDefinedMultipleTimes(SmolStr)
NonPrivateUseStar
NamedArgumentsAreNotSupported
ArgPassedToNegativeImpl
UnnamedArgumentFollowsNamed
NamedArgumentMismatch
UnsupportedOutsideOfFunction(UnsupportedOutsideOfFunctionFeatureName)
UnsupportedConstant
DivisionByZero
ExternTypeWithImplGenericsNotSupported
MissingSemicolon
TraitMismatch
DesnapNonSnapshot
InternalInferenceError(InferenceError)
NoImplementationOfIndexOperator
NoImplementationOfTrait
CallExpressionRequiresFunction
MultipleImplementationOfIndexOperator(TypeId)
UnsupportedInlineArguments
RedundantInlineAttribute
InlineAttrForExternFunctionNotAllowed
InlineAlwaysWithImplGenericArgNotAllowed
TailExpressionNotAllowedInLoop
ContinueOnlyAllowedInsideALoop
BreakOnlyAllowedInsideALoop
BreakWithValueOnlyAllowedInsideALoop
ReturnNotAllowedInsideALoop
ErrorPropagateNotAllowedInsideALoop
ImplicitPrecedenceAttrForExternFunctionNotAllowed
RedundantImplicitPrecedenceAttribute
UnsupportedImplicitPrecedenceArguments
UnsupportedFeatureAttrArguments
UnsupportedAllowAttrArguments
UnsupportedPubArgument
UnknownStatementAttribute
InlineMacroNotFound(SmolStr)
InlineMacroFailed(SmolStr)
UnknownGenericParam(SmolStr)
PositionalGenericAfterNamed
GenericArgDuplicate(SmolStr)
TooManyGenericArguments
GenericArgOutOfOrder(SmolStr)
CouponForExternFunctionNotAllowed
CouponArgumentNoModifiers
CouponsDisabled
Coupons are disabled in the current crate.
FixedSizeArrayTypeNonSingleType
FixedSizeArrayTypeEmptySize
FixedSizeArrayNonNumericSize
FixedSizeArrayNonSingleValue
FixedSizeArraySizeTooBig
SelfNotSupportedInContext
SelfMustBeFirst
DerefCycle
CompilerTraitReImplementation
ClosureInGlobalScope
MaybeMissingColonColon
CallingShadowedFunction
RefClosureArgument
MutableCapturedVariable
NonTraitTypeConstrained
DuplicateTypeConstraint
Fields
§
concrete_trait_type_id: ConcreteTraitTypeId
TypeConstraintsSyntaxNotEnabled
Implementations§
Source§impl SemanticDiagnosticKind
impl SemanticDiagnosticKind
pub fn error_code(&self) -> Option<ErrorCode>
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
impl Eq for SemanticDiagnosticKind
impl StructuralPartialEq for SemanticDiagnosticKind
Auto Trait Implementations§
impl Freeze for SemanticDiagnosticKind
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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>
Converts
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>
Converts
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