docs / Miri for Agents / Rules — miri explain

Rules — miri explain

Every code has a page that says what the rule is, why it exists and how a fixed program looks:

$ miri explain MER_PAR_020
MER_PAR_020 Unsupported C-Style Operator
error

Rule
A logical operator has been spelled with symbols. Miri spells logical and as the word `and` and logical or as the word `or`; `&&` and `||` are not operators. `miri fix` rewrites them (`word-operator`).

Before
let a = true
let b = false
let both = a && b

After
let a = true
let b = false
let both = a and b

Reference
Parser (docs/reference/parser.md)

The parser consumes a token stream and produces an abstract syntax tree (AST). It enforces syntactic structure: balanced parentheses and braces, well-formed declarations and expressions, and correct statement ordering. The parser is indentation-sensitive and requires expressions and statements to respect Miri's syntax rules.
exit status 0

miri explain --list lists every code. Add --format json to get each code's title, severity, safety level and repairs as data.