Lazy @rustlang Twitter: can you send me snippets of code where you *needed* higher kinded lifetimes?
I wish to identify as many cases as possible to categorize them and make rustc understand them and guide you in their direction.
-
Show this thread
-
Even better if you can also show me the road you took to reach the understanding that HKLT 1) were a thing and 2) you needed to use them.
4 replies 1 retweet 9 likesShow this thread -
Replying to @ekuber
Do cases where I ended up not being able to do the thing I need because projection through HRTB is broken count?
1 reply 0 retweets 1 like -
Replying to @sgrif
That is as important as valid cases, if not more so. Avoiding misleading suggestions is necessary.
1 reply 0 retweets 0 likes -
Replying to @sgrif
It seems to me that both those cases should indeed try to steer people to HRTB.
1 reply 0 retweets 1 like -
Replying to @ekuber
If it wasn't broken yes. But the problem is we can't even actually easily write what we need, which is bounds on an associated type *in* the HRTB (which we can't even name because function traits will never be stable I guess)
1 reply 0 retweets 0 likes -
e.g. what I really want here is something like: for<'a> { F: FnOnce<(&'a mut self)>, F::Output: Future<Output = Result<T, E>>, } but there's no way to write that without saying `F::Output` is the same for all lifetimes
1 reply 0 retweets 0 likes
But even if that existed it wouldn't help here since folks arbitrarily decided that we should only ever have the arrow syntax for fn traits because who needs projection I guess ¯\_(ツ)_/¯
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.