Hello,
I am facing an issue where I have an Entry API that return a view over some storage, to do so it takes a mutable borrow and return a structure holding that borrow, when that structure goes out of scope the borrow should disapear and thus let me reborrow, however this is not the case. here is the smallest code snippet I could make that show the issue. Please do note that the internal api and lifetime are structured like that for a reason and I can not use GAT (else it would be way easier).
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7a453666f4e796f4abfeeb266b26410a
And yes the obvious issue is due to this :
fn entry(&'a mut self, key: K) -> Entry<'a, Self, K, V>; which should really be fn entry(&mut self, key: K) -> Entry<'_, Self, K, V>; and even better fn entry(&mut self, key: K) -> Entry<'_, K, V>; but sadly this would mean a complete rework of my dispatch system to the storage.
A browser interface to the Rust compiler to experiment with the language
