So I was talking to @boats today about possible steps for async-await and one of the things they brought up was removing the dependency on TLS, or #62918. As far as we can tell, there is no hard blocker to this -- it requires us to add some form of argument to generators, but it doesn't require that this interface be "stable" (or close to stable). We also probably don't even need to have syntax for accessing a generator's argument, just a HIR node. Probably @Taylor Cramer has the best idea of what's involved, or maybe @Zoxc.
We had talked about the possibility of @boats doing the impl work here, though it might be better to find them some other "first bug", not sure how complex this will be.
@Benjamin Brittain had started working on this at one point
there was a thread in #t-compiler about it
ah yeah, I remember that
I wonder how far they got :)
not very far >_<
Mostly because I moved coasts in the middle of that though
I did the lowering part - started hacking on the MIR
There was some level of disagreement about what the generator argument looked like
I'd like to resume tackling this is the near future - that being said I'd rather it gets fixed than I personally doing it
I think the solution is to make the MIR generator resume function take a second argument that is a
*mut task::Context, and have the unstable generators just pass a null ptr
Rather than trying to have any sort of solution for resume arguments in generators
I agree that something "quick and dirty" seems sufficient for now