Think I just ran into a wart in Rust. Luckily I've got the time and enough experience at this point to know I'll be able to solve this, but others might not. Basically it's this: let foo = match bar { Some(bar) => bar, None => &make_bar()?, } where `bar` is borrowed.
What I really want is for the lifetime to be passed from the closure while the borrow holds. But blocks force a `Drop` which means the original value is gone. I don't know what the right solution is. Would love to hear if someone has a good idea on how to tackle this.