Borrow/lifetime errors are usually Rust compiler bugs.
Typically, I will spend 20 minutes detailing the precise conditions of
the bug, using language that understates my immense knowledge, while
demonstrating sympathetic understanding of the pressures placed on a
Rust compiler developer, who is also probably studying for several exams
at the moment. The developer reading my bug report may not understand
this stuff as well as I do, so I will carefully trace the lifetimes of
each variable, where memory is allocated on the stack vs the heap, which
struct or function owns a value at any point in time, where borrows
begin and where they... oh yeah, actually that variable really doesn't
live long enough.
Post in reddit