Module index

Module index 

Source
Expand description

The error index: every code the compiler can emit, in one place.

crate::Diagnostic::code promised “a stable code (B0101) so that tests, docs and the eventual error index agree”. This is that index, and the agreement is a test rather than an intention: beck-cli/tests/docs.rs scans every non-test source file in the workspace for a "Bnnnn" literal and fails if the set it finds differs from INDEX in either direction. A code cannot be added without an entry, and an entry cannot outlive its code.

§What an entry says, and where it comes from

Every diagnostic site in the compiler already carries a label, usually a note and often a fix-it — prose the project wrote next to the condition that raises it. CodeEntry::explain is that prose, condensed. Nothing here is a second, independent account of what the compiler does, because a second account is a thing that goes out of date.

Ranges are not decorative: the first two digits say which stage refused the program, which is usually the first question.

RangeStage
B01xxReading the source — lexer, S-expression reader, parser
B02xxMacro expansion, and the ui block it desugars
B03xxNames, types and effects — the checker
B04xxPlacement (B040x) and security (B041x)
B05xxThe signal graph and the slicer
B06xxModules, interfaces and separate compilation
B07xxTests written in Beck

Structs§

CodeEntry
One code, as the index describes it.

Enums§

Stage
The stage that raises a code.

Constants§

INDEX
Every code the compiler can emit, in code order.

Functions§

in_stage
Every code in one stage, in code order.
lookup
Look a code up. The lookup beck explain error B0301 and the rendered index both use.