Acton
Linting rules

E015: asm-function-missing-safety-comment

Requires documenting safety requirements for every declaration with an `asm` body.

Metadata

  • Code: E015
  • Rule: asm-function-missing-safety-comment
  • Status: Stable since v0.0.1
  • Quick 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";
E015: asm function requires safety comment

Use instead:

// SAFETY: `x` always contains at least 32 bits.
fun lowLevelLoad(x: slice): int asm "32 LDI";
Source code

Last updated on

On this page