Hello there, still trying to understand HRTB and especially structs with references and closures. I have the following example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1ad2d4175fc1f96d71c9e51b048c179b which uses a function with signature
fn with_pass(&self, f: impl for<'inner> Fn(&mut Pass<'inner>))
and leads finally to an error:
argument requires that `p` is borrowed for `'static`
which I cannot make sense. Maybe I'm trying something impossible here, but I would like to understand, what is happening... is this a self-referential closure struct and a misleading error message? Or something else?
A browser interface to the Rust compiler to experiment with the language