Step Errors (RS401)
Back to Error Catalog | Spec: step.md
Enforcement: rsc lint (rs edition only).
RS401: Step state outside module context
error[RS401]: #[step] state accessed outside of module context
help: #[step] state must be accessed within a module! block
help: step reset is managed by the module runtime
#[step] state is automatically reset at step boundaries by the module runtime. Accessing it outside a module context means no runtime manages its lifecycle — the reset would never happen, defeating the purpose of step scoping.
Fix
Access step state from within a module:
module!