pub enum DiagnosticCode {
Show 43 variants
E001,
E002,
E003,
E004,
E005,
E006,
E007,
E008,
E009,
E010,
E011,
E012,
E013,
E014,
E015,
E016,
E017,
E018,
E019,
E020,
E021,
E022,
E023,
E024,
E025,
E026,
E027,
E028,
E029,
E030,
E031,
E032,
E033,
E034,
E035,
E036,
E037,
E038,
E039,
E040,
E041,
E042,
E043,
}Expand description
Stable error codes for brink diagnostics.
Codes are never reused once assigned. Each code has a corresponding
explanation file at docs/diagnostics/Exxx.md.
Variants§
E001
Knot definition is missing a name.
E002
Stitch definition is missing a name.
E003
Knot or stitch parameter is missing a name.
E004
VAR declaration is missing a name.
E005
VAR declaration is missing an initializer.
E006
CONST declaration is missing a name.
E007
CONST declaration is missing an initializer.
E008
LIST declaration is missing a name.
E009
LIST member is missing a name.
E010
EXTERNAL declaration is missing a name.
E011
INCLUDE statement is missing a file path.
E012
Divert is missing a target.
E013
Thread start is missing a target.
E014
Logic line has no effect (bare ~).
E015
Expression is missing an operand.
E016
Unknown or unsupported operator.
E017
Function call is missing a name.
E018
Divert target expression is missing a path.
E019
Choice is missing bullet markers.
E020
Inline conditional is missing a condition.
E021
Inline sequence has no branches.
E022
Duplicate knot definition.
E023
Duplicate variable/constant definition.
E024
Unresolved divert target.
E025
Unresolved variable reference.
E026
Duplicate list item.
E027
Ambiguous bare list item reference.
E028
Circular INCLUDE dependency.
E029
Choice nested in conditional without explicit divert.
E030
String interpolation in constant initializer is ignored.
E031
Function call argument count mismatch.
E032
Return statement outside function.
E033
Unreachable code after divert.
E034
Choice set has only fallback choices.
E035
Name shadows a built-in function.
E036
Expected diagnostic not produced (// brink-expect).
E037
Syntax error reported by the parser (malformed source).
E038
Malformed /// doc-comment tag on a declaration.
E039
Registered host manifest disagrees with the ink EXTERNAL arity.
E040
Doc-comment / manifest references an unknown semantic type.
E041
External call argument type mismatches the manifest signature.
E042
External call argument violates a closed-domain constraint.
E043
Well-formed /// doc-comment tag that doesn’t apply to this
declaration kind (e.g. @kind on a knot, @param on a VAR).
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
Sourcepub fn from_str_code(s: &str) -> Option<DiagnosticCode>
pub fn from_str_code(s: &str) -> Option<DiagnosticCode>
Parse a diagnostic code from its string representation (e.g., "E027").
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DiagnosticCode
Source§impl Debug for DiagnosticCode
impl Debug for DiagnosticCode
impl Eq for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§fn eq(&self, other: &DiagnosticCode) -> bool
fn eq(&self, other: &DiagnosticCode) -> bool
self and other values to be equal, and is used by ==.