If I understand correctly, Polonius is aimed at resolving several known issues with the Rust lifetimes, such as those listed here: https://doc.rust-lang.org/nomicon/lifetime-mismatch.html#improperly-reduced-borrows . As Polonius is currently only available on nightly, I was wondering whether there are any available resources for overcoming these lifetime issues - be it with safe or
unsafe code - on stable? I am particularly interested in the
match use case, but I think it would be useful overall.
AFAIK, all lifetime issues can we worked-around using unsafe code. You "just" convert all the lifetimes to
'static (and optionally convert it back to something appropriate). Hopefully it's obvious why this is rarely used.
Thanks. I was afraid that was the only solution.