Stream: t-compiler/help

Topic: Closure lifetime arguments


Diggory Blake (Jun 01 2020 at 20:43, on Zulip):

I ran into https://github.com/rust-lang/rust/issues/59337 whilst trying to write some async code on stable, and I've been trying to find what the cause of the problem is / what the path to fixing it would be.
I assumed we expanded closures into a struct and some Fn impls fairly early on, but it seems we keep the "Closure" concept longer than I expected, and I couldn't find where the Fn impls "come from" so to speak. Is this something that would be fixed by polonius? By chalk? Or is it something separate that will require additional work?
It seems to be related to borrow checking primarily, but then also to "generic closures" which I know aren't implemented yet... But then I'm confused how lifetimes in closure parameters work at all when we don't support generic closures?

Diggory Blake (Jun 02 2020 at 00:45, on Zulip):

ah sty.rs:212 has some helpful explanation

Last update: Sep 28 2020 at 15:45UTC