Rellum Rellum

S0059: function cannot return Shared handle

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

Explanation

Shared[T] handles are valid only inside the tick where share(...) creates them. Returning a Shared[T] handle from a function would allow callers to store or reuse a tick-scoped alias after the tick has advanced.

Common causes

Canonical fixes

Before:

borrow(x: String) : Shared[String] = share(x)

After:

borrow(x: String) : String = x

Code example

borrow(x: String) : Shared[String] = share(x)