Appendix C — Diagnostics

Every diagnostic the book shows, with the one-line summary the compiler’s own catalog carries for it. The catalog holds 144 codes; these 47 are the ones a page in this edition prints. A code is stable: it identifies a rule, not a message, and wolf --explain E1001 prints the whole entry for any of them — the summary, the reasoning, and the fix — whether or not this book shows it.

The Shown by column names which implementation printed the text on the page. Both tools use the same codes for the same rules, so a code the book shows under one prompt is the same rule under the other. Where the column says both, some page shows both readings of it side by side.

CodeWhat it saysShown bySections
E0201the parser expected a different token or construct hereboth1.5, 4.1, 12.4, 14.1
E0202an opening delimiter is never closedboth1.5, Notation
E0203expected a declaration at the top levelwolfSolutions
E0301nothing with this name is in scopewolf10.1
E0302the same name is defined twice in one modulelupin22.1
E0303modules import each other in a cyclelupin22.2
E0304the item exists but is not visible from herelupin22.1
E0305this import is never usedlupin22.1
E0401the types do not matchwolf3.2, 4.1
E0410a let binding cannot be assigned againwolf3.1
E0412this format spec is malformedwolf18.3
E0501the generic body uses something its bounds do not providewolf5.3
E0602the error row does not include this tagwolf26.4, 26.5
E0701comptime code reached for ambient IOwolf18.4, 24.2
E0702comptime evaluation ran out of fuelwolf18.4
E0703comptime evaluation exceeded its heap budgetwolf18.4
E0704comptime evaluation recursed too deeplywolf18.4
E0705this value is not comptime-knownwolf18.1
E0706comptime arithmetic faultedwolf18.1
E0707const-generic equality needs a witnesswolf18.3
E0708layout is unresolved until codegenwolfSolutions
E0709invalid comptime budget attributewolf18.4
E0710a comptime assertion failedwolf18.1, 18.2, 22.3
E0801this match does not cover every casewolf3.4
E1001this value was moved away (or never given one) before this usewolf3.1, 7.1, 7.2, 7.6, 7.7, 9.8, Notation
E1002this needs exclusive access, but the value is in use herewolf7.5
E1005the region is open here, so its handle cannot move or freezewolf8.3
E1006this type’s shared references form a strong cyclewolf8.5, 8.7
E1007the argument’s mode does not match the parameter’swolf7.4
E1008the method touches a field outside its declared viewwolf7.5
E1010the value’s region is freed while the value is still neededwolf8.2, 8.4, 9.8
E1011this would open a region while a region that contains it is openwolf8.6
E1012frozen data cannot be writtenwolf8.5, 8.8, 30.4, 30.5
E1101a task may not mutate state it captured from the enclosing functionboth13.2
E1102this channel’s payload type is not sendableboth13.2
E1301this raw-tier operation needs an unsafe blockwolf9.2
E1302a raw pointer type cannot cross this boundarywolf9.2, 9.5, 32.2
E1303this module holds #[trusted] code the manifest does not declarewolf9.7, 32.3
E1305this door needs a region and a raw pointer, in that orderwolf9.4
E1401undefined behavior detected by the checked-build UB machineboth9.3
E1503the manifest declares a build-time script hook — wolf has none, everwolf24.2
E1504this package uses a capability its manifest does not declarewolf24.3
E1506a dependency’s content hash does not match wolf.sumwolf23.3
W0603this row tag’s case contradicts its payloadwolf27.5
W1003this take parameter is returned unchangedwolf7.2, Notation
W1101this write stays inside the taskwolf13.2
W1102the closure captured this value before it changedwolfSolutions

Two conventions in that table are worth stating. E-numbered codes stop the build or the run; W-numbered codes are advice, and the artifact is produced anyway (§27.5 shows a binary built over two warnings). And the families are blocked by hundreds: E02xx is the parser, E03xx resolution and modules, E04xx types, E05xx generics, E06xx error rows, E07xx comptime, E08xx exhaustiveness, E10xx memory, E11xx concurrency, E13xx the unsafe tier, E15xx packages.

Warnings the book does not print but the compiler emits often enough to recognize: W1001 (a region that never allocates) and W1002 (a mut binding the body never writes).