Skip to content
Playground(another site)

bynk.lex.legacy_doc_line

Error A --| one-line doc, the spelling before #2203; a one-line doc is --- text (auto-fixable; bynk fmt rewrites it).

A one-line doc is --- text. The older --| spelling is refused rather than reread, so no file written for it changes meaning unnoticed. The fix is machine-applicable: bynk check --fix applies it and bynk fmt rewrites a whole project. A --| with no text has no one-line form; write a doc block between two --- lines.

Example

--| Doubles a number. // ✗ the old spelling
fn double(n: Int) -> Int { n * 2 }
--- Doubles a number. // ✓
fn double(n: Int) -> Int { n * 2 }

In the Book

See also

  • Every code in its category, Lexer, on the diagnostic index.
  • bynk explain bynk.lex.legacy_doc_line shows the same from the installed toolchain, without a network.