Expand description
bynk explain <code> — the compiler’s own explanation of a diagnostic code
(#853), the analogue of rustc --explain.
Every bynk.* diagnostic carries a stable machine code, but a code alone is
a dead end for a newcomer. This subcommand prints the curated, offline-
complete explanation behind a code — what the rule is, why it exists, and a
minimal before/after example — plus a link to the relevant Book concept
page. The same bynk_syntax::diagnostics::EXPLANATIONS table backs the
editor’s clickable diagnostic-code links (codeDescription), so the two
surfaces never drift (DECISION A).
Coverage is incremental (DECISION B): a code with no curated explanation is reported gracefully (its one-line registry summary, and a note that a longer explanation is not written yet), and a code the compiler does not recognise at all exits non-zero. Neither is an error state for the feature — a half-covered set is a designed, documented condition.
Functions§
- run
- Run
bynk explain <code>. Exits0for a recognised code (explained or not) and non-zero for an unrecognised one.