E1844: documentation contradicts the ownership contract
The docstring of a public declaration says the opposite of what the ownership role of a parameter means (ADR-0041).
The docstring of a public declaration says the opposite of what the ownership
role of a parameter means (ADR-0041). The check looks for a few phrases: for
an abs parameter, which is borrowed read-only, takes ownership, transfer ownership and owns the buffer; for a dat parameter, which is consumed,
does not consume, never transfers ownership and borrowed only; for an
ins parameter, which is an exclusive loan, retains the pointer, borrow escapes and takes permanent ownership. The message is documentation contradicts the declaration ownership contract, naming the declaration, and
the error points at the declaration.
Example
The parameter value is abs, so the verb only borrows it, but the docstring
says that the verb takes ownership of it.
Fix
Describe the role that the declaration has, or change the role if the documentation is the intent.
Run actus explain E1844 in your terminal to read this entry offline. Browse Strict & toolchain or all error codes.