Skip to main content

DiagCode

Struct DiagCode 

Source
pub struct DiagCode(pub &'static str);
Expand description

A stable diagnostic code, e.g. "FORM-101" or "TYPL-108" (ADR-0007 decision 2). The empty string means “no code yet” — a diagnostic that has not been assigned a catalogue code renders as a plain message.

Tuple Fields§

§0: &'static str

Implementations§

Source§

impl DiagCode

Source

pub const NONE: DiagCode

The sentinel for a diagnostic that carries no catalogue code yet, such as the checker’s “expected a type, but X names a constant / an interface” errors (typl §16 defines no code for either) or the Rust backend’s codegen error. A diagnostic carrying it renders with no code after its severity word (error:, warning:), and the book harness can never allow one.

Source

pub fn as_str(&self) -> &'static str

The code string.

Source

pub fn is_empty(&self) -> bool

Whether this is the sentinel “no code yet” value.

Source§

impl DiagCode

Source

pub const FORM_001: DiagCode

Invalid character.

Source

pub const FORM_002: DiagCode

Unterminated string literal.

Source

pub const FORM_003: DiagCode

Unterminated regex literal.

Source

pub const FORM_004: DiagCode

Unterminated block comment.

Source

pub const FORM_005: DiagCode

Leading zeros in an integer literal.

Source

pub const FORM_101: DiagCode

Expected a specific token, or a construct the grammar admits here. Most call sites name a token (expected `]`); the interaction positions name the shapes instead — a return type is one of four, and saying which is the point of the message.

Source

pub const FORM_102: DiagCode

Unexpected token — also the code for nesting past the depth the parser follows (MAX_TYPE_DEPTH in ridl-syntax): a type, an attribute value, a parenthesised group, or an expression tree, whose height each binary operator, member access, group and prefix raises by one level.

Source

pub const FORM_103: DiagCode

Unclosed delimiter.

Source

pub const FORM_104: DiagCode

Missing package declaration.

Source

pub const FORM_105: DiagCode

Reserved word used as an identifier.

Source

pub const FORM_106: DiagCode

Unknown attribute key — not a key the general form §4.3 table defines.

Source

pub const FORM_107: DiagCode

Attribute key not allowed on this declaration kind (general form §4.3).

Source

pub const FORM_108: DiagCode

Duplicate attribute key in one [ ] block (general form §4.3).

Source

pub const TYPL_001: DiagCode

More than one package declaration in a single file (typl §16.1). Emitted by the package loader.

Source

pub const TYPL_002: DiagCode

Package name does not mirror the directory path relative to the manifest root (typl §16.1, ADR-0002 §1). Emitted by the package loader. Single-file mode is exempt.

Source

pub const TYPL_003: DiagCode

Wildcard, relative, or re-exporting import (typl §16.1, ADR-0002 §2). Emitted by the resolver.

Source

pub const TYPL_004: DiagCode

Circular package imports (typl §16.1, ADR-0002 §6). Emitted by the resolver from a depth-first walk over package import edges.

Source

pub const TYPL_005: DiagCode

A public declaration exposes an internal type in its fields, arms, backing, or a range-bound constant (typl §3.3, §16.1). Emitted by the checker over every top-level declaration, the ridl interface and service included: an interaction payload, parameter, return arm, or stream element is an exposure position exactly as a struct field is. A service naming an internal interface is RIDL-143 instead.

Source

pub const TYPL_006: DiagCode

Conflicting imports without an alias (typl §16.1, ADR-0002 §2). Emitted by the resolver.

Source

pub const TYPL_007: DiagCode

Unused import (typl §16.1). Emitted by the resolver as a warning.

Source

pub const TYPL_008: DiagCode

Import alias without an actual collision (typl §16.1, ADR-0002 §2). Emitted by the resolver as a warning.

Source

pub const TYPL_009: DiagCode

Duplicate definition of the same name in a package (typl §16.1).

Source

pub const TYPL_010: DiagCode

A package declaring a name the compiler provides itself (typl §3.1, §16.1). Error, and not a warning, because such a package can never work: ridl.std is implicitly imported by every package (typl §3.2) rather than resolved through an import, so a user copy is unreachable by its own name. In package and workspace mode the generated artifact is overwritten by the standard package’s too, because the output base is the package name; in single-file mode the base is the file stem, so that second consequence follows only when the stem is itself ridl.std, whatever the extension. Reported on the package declaration, in a workspace member and in single-file mode alike.

Source

pub const TYPL_011: DiagCode

A type reference names no visible declaration (typl §3.2, §3.3, §16.1): the path resolves neither in the package’s own scope, nor in ridl.std, nor through an import, nor as a qualified pkg.Name — a qualified reference to another package’s internal declaration included. Emitted by the checker on the written path, in every position that takes a type reference — for example a field, a parameter, a query return, a stream element, a payload, a union arm, a map key or a constant’s type. A reference that resolves to a declaration of the wrong kind (a constant, an interface) is a different error and still carries no code (driftsys/ridl#543).

Source

pub const TYPL_101: DiagCode

integer without a range constraint (typl §16.2). Warning.

Source

pub const TYPL_102: DiagCode

float without both a range and a step (typl §16.2). Warning.

Source

pub const TYPL_103: DiagCode

string/bytes without explicit bounds — the default [0..256] is applied (typl §4.4–§4.5, §16.2). Warning.

Source

pub const TYPL_104: DiagCode

Range min > max (typl §16.2).

Source

pub const TYPL_105: DiagCode

step type mismatch, non-positive, or larger than the range (typl §16.2). Also borrowed by the checker for a range bound that references a non-numeric constant, a malformed bound const for which §16.2 defines no dedicated code.

Source

pub const TYPL_106: DiagCode

Invalid regex syntax in a match constraint or a regex const (typl §16.2). Validated with the regress ECMA-262 engine (ADR-0007 decision 10). A pattern regress accepts and the Rust regex crate refuses is TYPL-220. Emitted by the checker.

Source

pub const TYPL_108: DiagCode

const value violates its declared type constraints (typl §16.2).

Source

pub const TYPL_109: DiagCode

Init (= value) incompatible with the type/field constraints (typl §16.2).

Source

pub const TYPL_110: DiagCode

Unknown or malformed UCUM unit expression (typl §16.2).

Source

pub const TYPL_111: DiagCode

Integer range bound (or enumset bit position) outside the int64 domain (typl §4.2, §16.2).

Source

pub const TYPL_115: DiagCode

Type has no derivable init value and no declared = value (typl §5.8, §16.2). Info — escalated to an error only by consumers that require an init (e.g. a ridl signal payload).

Source

pub const TYPL_201: DiagCode

Array without explicit bounds (typl §16.3).

Source

pub const TYPL_202: DiagCode

Map without explicit bounds (typl §16.3).

Source

pub const TYPL_203: DiagCode

Enum values not unique / not explicitly assigned (typl §16.3).

Source

pub const TYPL_204: DiagCode

Union arm with a primitive type (typl §16.3).

Source

pub const TYPL_206: DiagCode

Recursive composite reference, direct or transitive (typl §16.3).

Source

pub const TYPL_207: DiagCode

Enumset bit positions not unique (typl §16.3).

Source

pub const TYPL_208: DiagCode

string/bytes used directly as a field type (typl §16.3).

Source

pub const TYPL_209: DiagCode

Map key is not a named string type or a primitive (typl §16.3).

Source

pub const TYPL_210: DiagCode

Field, arm, or enum value re-declared under a reserved name or value (typl §16.3).

Source

pub const TYPL_211: DiagCode

Duplicate reserved entry (typl §16.3). Warning. The “dangling” half of the §16.3 rule (a name/value never previously used) needs the previous IR snapshot and belongs to ridl-diff.

Source

pub const TYPL_212: DiagCode

error modifier on a declaration other than enum, struct, union (typl §16.3).

Source

pub const TYPL_213: DiagCode

Union mixing error and non-error arms without the result-union shape (typl §16.3).

Source

pub const TYPL_214: DiagCode

error union containing a non-error-typed arm (typl §16.3).

Source

pub const TYPL_215: DiagCode

A field name declared twice in one struct or one tuple (typl §7, §11, §16.3). Distinct from RIDL-149: that code fires when two distinct struct field names collide only after a pinned name transform, and this one fires when the two source names are already the same, before any transform runs. Both fields still lower — this check reports and does not drop.

Source

pub const TYPL_216: DiagCode

An enum value name declared twice in one enum (typl §8, §16.3). Distinct from RIDL-149: that code fires when two distinct source names collide only after a pinned name transform, and this one fires when the two source names are already the same, before any transform runs. TYPL-203 checks the values’ integers, not their names, so it does not cover this case.

Source

pub const TYPL_217: DiagCode

A union arm name declared twice in one union (typl §10, §16.3). Distinct from RIDL-149: that code fires when two distinct source names collide only after a pinned name transform, and this one fires when the two source names are already the same, before any transform runs.

Source

pub const TYPL_218: DiagCode

A bit name declared twice in one standalone enumset (typl §9.1, §16.3). TYPL-207 checks the bits’ positions, not their names, so it does not cover this case. A derived enumset copies its bits from the backing enum, where a repeated name is TYPL-216.

Source

pub const TYPL_219: DiagCode

A standalone enumset bit position that is not a number with an integer value — a string, a boolean, a fractional number, a regex, or a constant reference, even one naming an integer constant (typl §9.1, §16.3). 1.0 has an integer value and is accepted as bit 1. The bit has no position to lower, so it is left out of the IR. An integer outside the int64 domain is TYPL-111, not this code. A non-integer enum value is TYPL-203.

Source

pub const TYPL_220: DiagCode

A match pattern or regex const that is valid ECMA-262 syntax (so not TYPL-106) but that the Rust regex crate cannot compile — for example lookaround, a backreference, \cX, \0, [], [^], {,n}, or a pattern over the crate’s compiled-size limit; typl §2.7 lists more, and neither list is complete (typl §2.7, §6.2, §16.3). The Rust backend emits a match on a String-backed type as a regex::Regex::new(..).expect(..) call under the generated crate’s validate-pattern feature, so without this check such a pattern panics in the consumer’s process (issue #437). A regex constant is emitted as a &str and not compiled, but a match naming it is. This code guarantees only that the Rust output can compile the pattern, not that every engine matches the same strings with it (issue #597). Emitted by the checker.

Source

pub const TYPL_222: DiagCode

One exact site name is used with different canonical units across the checked workspace. Emitted by the design lint pass. Info from the corpus calibration (evals/calibration/summary.md).

Source

pub const TYPL_224: DiagCode

Two differently named declarations have equal field or variant sets. Emitted by the design lint pass. Info from the corpus calibration (evals/calibration/summary.md).

Source

pub const TYPL_301: DiagCode

Stream type <T> outside interaction position (typl §16.4, ridl §12.3). Emitted by the parser in a .typl parse and by the checker for struct fields and collections in a .ridl file.

Source

pub const TYPL_302: DiagCode

Timing annotation or duration literal in a typl context (typl §16.4).

Source

pub const TYPL_303: DiagCode

require/ensure attribute in a typl context (typl §16.4): the two contract attributes at declaration-start position in a .typl parse. Emitted by the parser as a bare string literal rather than through this constant — see codes_written_as_string_literals_are_all _catalogued.

Source

pub const TYPL_304: DiagCode

Interaction declaration in a typl context (typl §16.4, ADR-0007 decision 10): one of the nine ridl words at declaration-start position in a .typl parse. Emitted by the parser.

Source

pub const TYPL_401: DiagCode

A doc link or an @see target that does not resolve (typl §14, §16.5; ADR-0026): the name is unknown, is internal in another package, or names no member of the declaration. Warning. Emitted by the checker, which resolves every link candidate.

Source

pub const TYPL_404: DiagCode

Blank line between a doc comment and its carrier (typl §14, §16.5; ADR-0026 extends it from declarations to every carrier). Warning. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const TYPL_405: DiagCode

@deprecated doc tag without a reason string (typl §14.2, §16.5). Warning. Emitted by the checker.

Source

pub const TYPL_406: DiagCode

A covered item with no doc (ADR-0026): a declaration that is not internal, a member of one, or an rsdl declaration. A doc made only of tags counts as missing. Warning. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const TYPL_407: DiagCode

Doc comment in a position that is not a carrier (ADR-0026): before package, an import, a return type or an attribute block, or at the end of a file or a body. Warning. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const TYPL_408: DiagCode

A doc tag other than @see, @since, @deprecated and @labels (typl §14.2, ADR-0026). Warning. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const TYPL_409: DiagCode

@see or @since with a missing or malformed value (ADR-0026). Warning. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const TYPL_410: DiagCode

Doc comment written as /** */ (ADR-0026). Warning, allow by default, so a project opts in to requiring ///. Emitted by the doc lints (ridl_sem::doc_lint).

Source

pub const RIDL_100: DiagCode

signal or event without a timing annotation — the default [100ms..1000ms] (or the configured [defaults].timing) is applied (ridl §9.1, §16.1). Warning. Emitted by the checker.

Source

pub const RIDL_101: DiagCode

A range annotation @[X..Y] whose lower bound exceeds its upper bound (ridl §9.2, §16.1). Emitted by the checker.

Source

pub const RIDL_102: DiagCode

A zero or negative timing duration (ridl §9.2, §16.1). Emitted by the checker.

Source

pub const RIDL_103: DiagCode

A strict-periodic @Xms annotation on a kind other than signal — the isochronous mode belongs to state alone (ridl §9.2, §16.1). Widened from “on an event” by ADR-0015 decision 6 when command and query gained the range form: the same rule, stated over the three kinds it excludes instead of one. Emitted by the checker.

Source

pub const RIDL_104: DiagCode

Explicit return type on a command — a command always returns () (ridl §6.1, §16.1). Emitted by the checker.

Source

pub const RIDL_105: DiagCode

query returning () — use command (ridl §7.1, §16.1). Emitted by the checker.

Source

pub const RIDL_106: DiagCode

A timing annotation on fixed — the one kind that carries none — or an attribute block on fixed (ridl §8, §9, §16.1). Emitted by the checker.

Narrowed by ADR-0015 decision 6: command and query admit the range form now, so the two RPC kinds left this rule and only fixed remains in both halves. The callables drew FORM-102 until the E2 close-out, so one rule sat under two codes and one of them was a parse code whose catalogue meaning is “unexpected token” — for a token the grammar accepts on purpose, precisely so the narrowing can be a semantic rule with a semantic message.

Source

pub const RIDL_107: DiagCode

Type declaration inside an interface or service body — typl declarations live at package level (ridl §14.1, §16.1).

Emitted by the parser, as a bare string literal (ridl-syntax cannot reference DiagCode), at the point where it recognises the keyword and recovers the declaration into an ErrorNode. The checker used to code that node a second time, so every RIDL-107 arrived paired with a contradicting FORM-102 at the same span; the parser knows exactly what the construct is, so it is the one that names it. RIDL-403 and TYPL-304 are parser-raised for the same reason. The constant is kept for the catalogue and for the error index.

Source

pub const RIDL_108: DiagCode

A range annotation @[X..X] whose bounds are equal — a degenerate range, the rate floor equal to its staleness bound, on a signal and an event alike (ridl §9.2, §16.1; ADR-0008 decision 17). Not a spelling of the strict-periodic @Xms, which is a separate TimingMode. Warning. Emitted by the checker.

Source

pub const RIDL_109: DiagCode

Signal payload type has no derivable init value and no = value override (ridl §4.4, §16.1). Emitted by the checker.

Source

pub const RIDL_110: DiagCode

Signal = value init override violates the payload type’s constraints (ridl §4.4, §16.1). Emitted by the checker.

Source

pub const RIDL_112: DiagCode

A command or query with no declared response bound — no @ annotation at all, or the half-open @[min..] that declares a throttle only (ridl §9.3, §16.1; ADR-0015 decisions 4 and 6). The checker applies the response-bound default for the member’s kind — [defaults].command_timing or [defaults].query_timing, or the built-in [..1s] or [..3s] — and this warning names the bounds applied. Warning; an active profile may escalate it to an error, the same two-step §9.1 gives an untimed signal or event. The RPC counterpart of RIDL-100, kept as its own code so that the missing-response-bound lint level is set apart from the signal and event one. RIDL-111 is reserved for the interface-used-as-a-type error (ADR-0008 decision 21), so 112 is the first free code in the band. Emitted by the checker.

Source

pub const RIDL_140: DiagCode

Duplicate service name across the whole workspace — the service catalog is a flat global namespace (ridl §14.5, §16.4). Emitted workspace-wide by service_catalog. The reference numbers it in the 1xx band while listing it under the §16.4 evolution/profile table — a documented anomaly kept as written (ADR-0008 decision 6).

Source

pub const RIDL_141: DiagCode

A service names a type that is not an interface, and has no inline shape (ridl §14.5, §16.4). Emitted per-package by the checker. Kept in the 1xx band per ADR-0008 decision 6 (see RIDL-140). Applies per shape in the service’s shape list since ADR-0015 decision 18: the rule is unchanged, the span reports against the offending list element.

Source

pub const RIDL_143: DiagCode

A service publishes an internal interface (ridl §14.5, §16.4). Emitted per-package by the checker’s exposure pass. Distinct from TYPL-005: what leaks is an interface rather than a type, and a service takes no internal modifier, so the TYPL-005 remedy — make the exposing declaration internal too — does not exist here. Kept in the 1xx band beside RIDL-140/-141 per ADR-0008 decision 6. RIDL-111 and RIDL-142 are reserved by decision 21 and not yet implemented, so 143 is the next free code; decision 13’s allocation ledger needs the ninth entry (issue #169). Applies per shape in the service’s shape list since ADR-0015 decision 18: the rule is unchanged, the span reports against the offending list element.

Source

pub const RIDL_144: DiagCode

Duplicate member name across a service’s interfaces (ridl §14.5, §16.4; ADR-0015 decisions 16 and 18): two composed interfaces both declaring status would give service.status two referents, which flat addressing cannot express. Emitted per-package by the checker The service codes sit in the 1xx band (see RIDL-140); RIDL-112 is minted by ADR-0015 decision 6, so 144 is the first free code.

Source

pub const RIDL_145: DiagCode

The same interface named twice in one service (ridl §14.5, §16.4; ADR-0015 decision 18). Its own code rather than a fall-through to RIDL-144: listing a shape twice makes every member collide, so RIDL-144 alone would emit one diagnostic per member and bury the actual mistake. Emitted per-package by the checker; lowering keeps the first listing only, which holds the slot, and the diagnostic’s secondary label points at it.

Source

pub const RIDL_149: DiagCode

Two names in one scope that collide after a pinned name transform (ridl §16.4; ADR-0016 decision 3). Neither transform is injective and no case-folding transform can be, so parseHTTPResponse and parseHttpResponse both project to parse_http_response and a target whose namespace is snake_case would carry one identifier twice — in Rust, one trait with two methods of the same name, or one function with two identically named arguments. The projection contract’s injectivity obligation is discharged here, on the package, because it cannot be carried by the function. Its own code rather than RIDL-402 — that rule is the same name declared twice — because the remedy differs: these names are distinct in source and only their projections collide. Scoped to the members of one interface, the parameters of one interaction (decision 4), the fields of one struct, which joined in the commit where the proto3 backend started projecting them onto proto3, the arms of one union, which joined with the ADR-0016 amendment of 2026-09-20, and the values of one enum, which joined with the amendment of 2026-09-26. The first three namespaces are checked under snake_case alone; a union’s arms are checked under snake_case and camel_case both, because a union arm reaches both namespaces and the two collision sets are incomparable; an enum’s values are checked under pascal_case alone, because its collision set contains snake_case’s. The message names the transform that collided. Emitted per-package by the checker.

Source

pub const RIDL_201: DiagCode

Stream <T> on a signal or event payload (ridl §12.3, §16.2). Emitted by the checker.

Source

pub const RIDL_202: DiagCode

Stream element type not a named type, string, or bytes (ridl §12.2, §16.2). Emitted by the checker.

Source

pub const RIDL_301: DiagCode

require or ensure on signal, event, or fixed (ridl §13, §16.3). Emitted by the checker.

Source

pub const RIDL_302: DiagCode

ensure on command — a command has no result to observe (ridl §6.1, §16.3). Emitted by the checker.

Source

pub const RIDL_303: DiagCode

A fallible query return with no success path (ridl §10.1, §16.3; general form §6.1): a bare error type in return position, an error-typed success (left) arm of an inline T | E, or a non-error error (right) arm. Error. Emitted by the checker.

Source

pub const RIDL_304: DiagCode

An error-typed or result-union parameter on a command or query — failure flowing toward a provider (ridl §10.1, §16.3). Warning. Emitted by the checker.

Source

pub const RIDL_305: DiagCode

An ensure clause that never references result — well-typed but suspicious (ridl §13, §16.3; expr-core specification §8). Warning. Emitted by the checker.

Source

pub const RIDL_306: DiagCode

A require/ensure expression outside the guaranteed subset (ridl §13, §16.3; expr-core specification §8 — one code for the whole boundary, with a message naming the offending form). Error. Emitted by the checker.

Source

pub const RIDL_307: DiagCode

An error enum declares a Stratum-2 contract-error category name (INVALID_VALUE, PRECONDITION_FAILED, CONTRACT_BROKEN, UNKNOWN_INTERACTION) — reserved vocabulary (ridl §10.2, §16.3). Warning. Emitted by the checker.

Source

pub const RIDL_308: DiagCode

A named result union in query return position — the inline T | E spelling is canonical there (general form §6.1, ADR-0008 decision 13). Warning; the named spelling stays legal typl data, so this is a lint, not an error. Emitted by the lint pass.

Source

pub const RIDL_401: DiagCode

Interaction re-declared under a reserved name (ridl §11, §16.4). Emitted by the checker.

Source

pub const RIDL_402: DiagCode

Duplicate interaction name in one interaction body — an interface or a service’s inline shape (ridl §14.1, §16.4). Emitted by the checker; lowering keeps the first declaration only, and the diagnostic’s secondary label points at it.

Source

pub const RIDL_403: DiagCode

Behaviour, user-interaction, or architecture declaration in a ridl context (ridl §16.4): a reserved word of the uxdl/rmdl/rsdl profiles at declaration-start position in a .ridl parse. Emitted by the parser.

Source

pub const RIDL_404: DiagCode

A query named like a mutation — set…, reset…, and the rest of the mutating verb set (ridl §7.2, §16.4): a state-mutating request belongs to command. Warning. Emitted by the lint pass.

Source

pub const RIDL_405: DiagCode

One error type used as the failure arm of queries in three or more distinct interfaces — the “shared across unrelated failure domains” heuristic (ridl §10.1, §16.4). Info. Emitted by the lint pass; the threshold is three, so two interfaces stay silent.

Source

pub const RIDL_406: DiagCode

A signal or event payload whose struct re-declares envelope metadata — publication time or a frame counter (ridl §3.1, §16.4). Info; domain time distinct from transport time is legitimate, so the message says so. Emitted by the lint pass.

Source

pub const RIDL_407: DiagCode

An interaction’s, struct field’s or union arm’s ordinal (typl §7.4) changed against a published baseline snapshot (ridl §11, general form §6.3). Warning. Emitted by the ridl check desk check, never by the compiler: the comparison reads a workspace-local baseline, which is outside ridlc’s source→IR function (ADR-0008 decisions 9 and 13). For a struct field or union arm the desk reads the verdict ridl diff gates on, so the two agree by construction (driftsys/ridl#533): one warning per change the diff reports as breaking. That is a member inserted above a live one or into a retired slot; a member removed, with or without a tombstone, because ridl diff matches a composite member by name and does not yet read the body’s reserved entries; a member whose ordinal moved in an edit that added or removed none, by a reorder or by a reserved entry added, moved or removed above it; and a member appended beside any of those, which the diff reports as breaking for that sibling change — the message also says when the appended struct field is breaking for its type, and tells the author to declare it optional (driftsys/ridl#598). An append alone draws nothing, not even one breaking for its type, which moves no ordinal, except an arm added to a result union, whose arms are its transport identity (ADR-0008 decision 4). The diff reports no reorder beside an addition or a removal, so the warning for an added or removed member names the siblings whose ordinal changed. An enum value’s or enum-set bit’s reorder is not a change (typl §8, §9) and does not draw this warning (driftsys/ridl#335); an enum value added or removed is ridl diff’s alone.

Source

pub const RIDL_408: DiagCode

An interaction of an interface body the baseline being replaced declares is not carried forward as the tombstone rule requires (ridl §11), in one of four shapes: it is gone from the source with no reserved tombstone; the source retires it with a tombstone at an ordinal other than its own; the baseline already retired it and the source dropped the tombstone; or the source declares a live interaction under the name a tombstone retires. Error. Emitted by ridl baseline alone, for the interaction level only — a whole interface or service removed, and a named-form service’s shape list, are outside it. Publication is the last point at which the change can still be refused, because the snapshot about to be overwritten is the only record that the ordinal was ever taken. Distinct from RIDL-407, which is the desk-time warning that an ordinal moved and which neither classifies nor gates.

Source

pub const RIDL_409: DiagCode

A live entry of the package’s interfaces.lock names an interface the package no longer declares (lock design §4, §8) — the interface was renamed or removed, and the lock does not record which. Error. Emitted by the checker on the entry’s own line of the lock file, ridlc and ridl alike. The fix is ridl lock <pkg> --retire Old when the interface is gone, or ridl lock <pkg> --rename Old=New when a declaration without an entry is the same interface under a new name; the message names only --retire when the package has no declaration without an entry. ridl check adds a label naming the one --rename command when the published baseline shows exactly one declaration without an entry with the old interface’s shape.

Source

pub const RIDL_410: DiagCode

The package’s interfaces.lock is malformed (lock design §2, §8): no next line, next not greater than every entry’s number, one number on two entries, one live key on two entries, or a line that does not parse — git conflict markers included. Error. Emitted by the loader, on the offending line of the lock file itself (or at the start of an empty file), so ridlc and ridl alike stop on it; the package then compiles without its lock. The fix is to resolve the conflict or restore the file from version control and run ridl lock.

Source

pub const RIDL_411: DiagCode

An interface in the snapshot ridl baseline is about to publish carries a provisional number — a declaration with no entry in the package’s interfaces.lock (lock design §3, §8). A provisional number is no identity: ridl diff never matches on it, so a snapshot holding one records nothing a later comparison can hold the interface to. Error. Emitted by ridl baseline alone, at the declaration’s name, for a first publication as for a replacement. The fix is plain ridl lock, which allocates and records the number, then publish.

Source

pub const RIDL_412: DiagCode

An interface number the published baseline holds is absent from the fresh snapshot and not among its interfaces.lock retired entries (lock design §4, §8) — a lock line deleted by hand, since a live entry with no declaration already fails the build with RIDL-409. Publishing would lose the only record that the number was allocated, and next could hand it to a later interface. Error. Emitted by ridl baseline alone, for a published number other than 0: a snapshot published before the lock existed carries 0, which is never allocated, and is matched by name. The fix is to restore the entry’s line in interfaces.lock from version control, with retired after the number when the interface is gone.

Source

pub const RIDL_413: DiagCode

A parameter name declared twice in one command or query parameter list (ridl §6.1, §7.1, §16.4). Distinct from RIDL-149: that code fires when two distinct source names collide only after a pinned name transform, and this one fires when the two source names are already the same, before any transform runs. Both parameters still lower — this check reports and does not drop.

Source

pub const RIDL_414: DiagCode

A declared interface has disconnected groups of members under direct named-type sharing. Info from the corpus calibration (evals/calibration/summary.md).

Source

pub const RSDL_305: DiagCode

instances is not a parenthesised list of one or more camelCase names — (), instances = solo (rsdl §5, §7, §16.1). Error. Raised by the rsdl attribute check.

Source

pub const RSDL_306: DiagCode

A duplicate instance name in one component (rsdl §7, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_307: DiagCode

Unit written in source — as a declared instance name, or as the instance segment of a reference (rsdl §7, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_308: DiagCode

A component requires an interface listed by a service it offers (rsdl §3.2, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_309: DiagCode

The same service on two offers lines, or the same interface on two requires lines, of one component (rsdl §3.2, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_310: DiagCode

An offers line names something that is not a service, or nothing (rsdl §3.2, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_311: DiagCode

A requires line names a service whose shape is a list of interfaces; the diagnostic lists them (rsdl §3.2, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_312: DiagCode

A requires line names something that is neither an interface nor an inline-shape service, or nothing (rsdl §3.2, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_313: DiagCode

external written with a value — it is a flag (rsdl §5, §16.1). Error. Raised by the rsdl attribute check.

Source

pub const RSDL_403: DiagCode

A closure component requires an interface that no closure service lists — a missing provider (rsdl §8, §16.1). Error. Raised by the rsdl resolution.

Source

pub const RSDL_408: DiagCode

An interface listed by two services of the closure, raised for every interface they list (rsdl §8, §16.1). Error. Raised by the rsdl resolution.

Source

pub const RSDL_409: DiagCode

A requires resolves to a redundant provider set — an offering component with more than one instance (rsdl §7, §16.1). Warning, not yet realizable: the lowering proceeds. Raised by the rsdl resolution.

Source

pub const RSDL_502: DiagCode

Two closure components offer one service (rsdl §8, §16.1). Error. Raised by the rsdl resolution.

Source

pub const RSDL_504: DiagCode

A member line names a service by its name while a declared component offers it; the diagnostic names the offerer (rsdl §6, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_601: DiagCode

More than one system in the workspace (rsdl §3.1, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_602: DiagCode

A system member line names nothing that is a component or a service (rsdl §3.1, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_603: DiagCode

A name listed twice in one system body (rsdl §3.1, §16.1). Error. Raised by the rsdl closure check.

Source

pub const RSDL_604: DiagCode

A declaration of another profile — a type, an interface, a service — at the top level of an .rsdl file (rsdl §2, §16.1). Error. Raised by the parser.

Source

pub const RSDL_701: DiagCode

An instance of a closure component with no placement in a deployment (rsdl §9, §16.1). Error; blocks that deployment only (§13). Raised by the rsdl placement check.

Source

pub const RSDL_702: DiagCode

A placement line names a component, instance or service outside the closure, or a name that resolves to nothing (rsdl §9, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_704: DiagCode

deployment … for Y where Y resolves to no declared system (rsdl §3.4, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_705: DiagCode

Two machines with one name in one deployment (rsdl §3.5, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_706: DiagCode

An instance placed twice in one deployment, also Cruise together with Cruise.primary (rsdl §9, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_707: DiagCode

An external machine lists an implemented component (rsdl §9, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_708: DiagCode

Two deployments with one name in the workspace (rsdl §3.4, §16.1). Error. Raised by the rsdl placement check.

Source

pub const RSDL_709: DiagCode

A depth, slots or budget value that is not an integer literal within the key’s range (rsdl §5, §16.1). Error, scoped to its deployment (rsdl §13). Raised by the rsdl attribute reader.

Source

pub const RSDL_804: DiagCode

A backend key whose namespace no configured backend claims (rsdl §5, §16.1). Warning: the key is still carried. Raised by ridlc, which knows the configured backends (plan decision P-B4).

Source

pub const RSDL_805: DiagCode

A declared depth below the contract bound ceil(max / min) of an event a covered link consumes (rsdl §5, §16.1). Warning: the declared value replaces the bound, and occurrences alive at once can then be dropped. Raised by the rsdl depth check.

Source

pub const RSDL_806: DiagCode

An event whose contract bound is not derivable — an explicit half-open range, or a ratio ceil(max / min) outside the depth range — consumed by a link with no declared depth (rsdl §5, §16.1). Warning: the ring depth of the link cannot be derived. Raised by the rsdl depth check.

Source

pub const RSDL_901: DiagCode

A PLATFORM distribution holds a component whose requires resolves into an APPLICATION distribution — tier inversion; a distribution without tier is exempt (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_903: DiagCode

A distribution member line names something outside the closure, or nothing (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_904: DiagCode

An implemented closure component in no distribution, while the workspace declares at least one (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_905: DiagCode

A component listed by two distributions (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_906: DiagCode

A name listed twice in one distribution body (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_907: DiagCode

An external component listed by a distribution (rsdl §3.3, §16.1). Error. Raised by the rsdl distribution check.

Source

pub const RSDL_908: DiagCode

A tier value other than PLATFORM or APPLICATION (rsdl §5, §16.1). Error. Raised by the rsdl attribute check.

Source

pub const MANI_001: DiagCode

The ridl.toml text is not valid TOML.

Source

pub const MANI_002: DiagCode

The manifest declares both [package] and [workspace]; the two modes are mutually exclusive (ADR-0002 §4).

Source

pub const MANI_003: DiagCode

The manifest declares neither [package] nor [workspace] (ADR-0002 §4).

Source

pub const MANI_004: DiagCode

A workspace member’s own manifest declares [workspace]; nested workspaces are forbidden (ADR-0002 §4). Defined here, but emitted by the package loader when a member manifest is read — a single manifest parsed in isolation cannot know it is a member.

Source

pub const MANI_005: DiagCode

An unrecognized key in the manifest or one of its sections (warning).

Source

pub const MANI_006: DiagCode

The package name is not lowercase dot-separated segments (ADR-0002 §1).

Source

pub const MANI_007: DiagCode

An [imports] value is not a valid import URL.

Source

pub const MANI_008: DiagCode

A workspace member directory is missing or has no ridl.toml. Emitted by the package loader, which is where member paths are resolved against the filesystem.

Source

pub const MANI_009: DiagCode

A manifest [defaults].timing, [defaults].command_timing or [defaults].query_timing value is not a valid range (ridl §9.1, §9.3, ADR-0008 decision 13); the message names the key. The manifest parser stores the raw strings unparsed — ridl-core cannot depend on ridl-sem — so the checker parses them and emits this code.

Source

pub const MANI_010: DiagCode

A [lints] entry whose key is not a registered lint name, or whose value is not one of the level strings allow, info, warn and deny; also a lints key that is not a table (ADR-0024 decision 11). The entry is ignored and the check goes on.

Source

pub const MANI_011: DiagCode

The file named by [codegen] header-file cannot be used: it cannot be read (it does not exist, or an I/O error occurred), its text is not UTF-8, or it contains a control character: any character for which char::is_control holds (C0, DEL and C1) other than a tab and a line break, or U+2028 or U+2029. The message names the resolved path.

Source

pub const MANI_012: DiagCode

A workspace member’s manifest sets [codegen] header-file. Only the workspace root’s manifest, or a standalone package’s manifest, may set it.

Source

pub const MANI_101: DiagCode

A remote import could not be fetched (network failure, a non-2xx HTTP status, or a value that is not a fetchable http(s) URL).

Source

pub const MANI_102: DiagCode

Fetched content hashes to a value that does not match the SHA-256 the lockfile pins for the same URL (ADR-0002 §7).

Source

pub const MANI_103: DiagCode

--frozen was requested but the lockfile has no entry for a remote import; a frozen build never regenerates the lockfile (ADR-0002 §7).

Source

pub const MANI_104: DiagCode

--frozen was requested and a lockfile-pinned import is not present in the cache; a frozen build never fetches (ADR-0002 §7).

Trait Implementations§

Source§

impl Clone for DiagCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DiagCode

Source§

impl Debug for DiagCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DiagCode

Source§

impl Hash for DiagCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DiagCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for DiagCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DiagCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HashEqLike<&T> for T
where T: Hash + Eq,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &&T) -> bool

Source§

impl<T> HashEqLike<Cow<'_, T>> for T
where T: Hash + Eq + Clone,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &Cow<'_, T>) -> bool

Source§

impl<T> HashEqLike<T> for T
where T: Hash + Eq,

Source§

fn hash<H>(&self, h: &mut H)
where H: Hasher,

Source§

fn eq(&self, data: &T) -> bool

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Lookup<T> for T

Source§

fn into_owned(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more