Skip to main content

Module error

Module error 

Source
Expand description

Error types and compiler diagnostics.

Provides the error infrastructure used throughout the compilation pipeline. Errors carry source location information for diagnostic rendering.

§Diagnostic System

Errors and warnings can include rich diagnostic information:

  • Labels: Secondary spans pointing to related code locations
  • Notes: Informational context about the error/warning
  • Helps: Actionable suggestions for fixing the issue

Structs§

CloneStructNonCopyFieldError
Payload for ErrorKind::CloneStructNonCopyField (ADR-0065).
CompileErrors
A collection of compilation errors.
Diagnostic
Rich diagnostic information for errors and warnings.
DiagnosticWrapper
A compilation diagnostic (error or warning) with optional source location.
ErrorCode
A unique error code for each error type.
FieldWrongOrderError
Payload for ErrorKind::FieldWrongOrder.
Help
An actionable help suggestion.
InterfaceMethodMissingData
Boxed payload for ErrorKind::InterfaceMethodMissing (ADR-0056).
InterfaceMethodSignatureMismatchData
Boxed payload for ErrorKind::InterfaceMethodSignatureMismatch (ADR-0056).
InterfaceMethodUncheckedMismatchError
Payload for ErrorKind::InterfaceMethodUncheckedMismatch (ADR-0088).
IntrinsicTypeMismatchError
Payload for ErrorKind::IntrinsicTypeMismatch.
Label
A secondary label pointing to related code.
MissingFieldsError
Payload for ErrorKind::MissingFields.
Note
An informational note providing context.
PostureMismatchError
Payload for ErrorKind::PostureMismatch (ADR-0080).
PreviewFeatureIter
An iterator over the variants of PreviewFeature
Suggestion
A suggested code fix that can be applied to resolve a diagnostic.

Enums§

Applicability
How confident we are that a suggested fix is correct.
ErrorKind
The kind of compilation error.
PreviewFeature
A preview feature that can be enabled with --preview.
WarningKind
The kind of compilation warning.

Traits§

OptionExt
Extension trait for converting Option<T> to CompileResult<T>.

Type Aliases§

CompileError
A compilation error with optional source location information.
CompileResult
Result type for compilation operations.
CompileWarning
A compilation warning with optional source location information.
MultiErrorResult
Result type for operations that can produce multiple errors.
PreviewFeatures
A set of enabled preview features.