S0135: reference cannot be stored in persistent reactive storage
Generated from rellum-diagnostics/src/db.rs.
Explanation
~ state, graph outputs, and request stored values persist across tick phases. A reference is valid only for its borrow region, so storing it in persistent reactive data could leave a dangling reference on a later tick.
Common causes
- returning &line from a feedback clause
- making a top-level graph binding whose value is a reference
- storing a request handler result that contains a reference
Canonical fixes
- store an owned value instead of a reference
Before:
held ~ feedback(on line => &line, none)
After:
held ~ feedback(on line => line, "")
- compute with the reference locally and return an owned result
Code example
held ~ feedback(on line => &line, none)