Skip to content
Playground(another site)

bynk.parse.multiple_docs

Error A declaration or member has two docs directly above it; a target has one doc, so a doc of more than one line is a --- block.

A declaration or member has one doc. Two doc lines in a row are two docs, not one of two lines. For more than one line, write a doc block: a --- line, the text, and another --- line. When every doc is a one-line --- text, the fix that joins them into a block is machine-applicable, so bynk check --fix applies it.

Example

--- Doubles a number.
--- Used by the pricing code. // ✗ a second doc
fn double(n: Int) -> Int { n * 2 }
--- // ✓ one doc block
Doubles a number.
Used by the pricing code.
---
fn double(n: Int) -> Int { n * 2 }

In the Book

See also

  • Every code in its category, Parser, on the diagnostic index.
  • bynk explain bynk.parse.multiple_docs shows the same from the installed toolchain, without a network.