Linting rules
E015: asm-function-missing-safety-comment
Requires documenting safety requirements for every declaration with an `asm` body.
Metadata
Code:E015Rule:asm-function-missing-safety-commentStatus: Stable sincev0.0.1Quick fix: not available
What it does
Requires documenting safety requirements for every declaration with an asm body.
Why is this bad?
asm bypasses high-level safety guarantees. Without an explicit safety note,
it is hard to review assumptions and soundness constraints.
Example
fun lowLevelLoad(x: slice): int asm "32 LDI";Use instead:
// SAFETY: `x` always contains at least 32 bits.
fun lowLevelLoad(x: slice): int asm "32 LDI";Last updated on