Rellum Rellum

S0058: Shared handle cannot be stored in state

Generated from rellum-diagnostics/src/db.rs.

Explanation

Shared[T] handles are tick-scoped aliases created so Move values can be read by multiple consumers within one tick. Storing a Shared[T] handle in ~ state would let it outlive the tick that created it, which would make later ticks read an invalid handle.

Common causes

Canonical fixes

Before:

history ~ feedback(
    on line => share(line),
    share("")
)

After:

history ~ feedback(
    on line => line,
    ""
)

Code example

history ~ feedback(
    on line => share(line),
    share("")
)