3 ms·
Yes, also just after posting I noticed you can't have unsized values living across await in generators without some major changes or something. The problem is
by dathinab 6y ago
Yes, also just after posting I noticed you can't have unsized values living across await in generators without some major changes or something.
The problem is that when you create a generator it doesn't yet know the unsized field it only knows it when creating it in a `poll` call. But it only will call poll after pinning the generator at which point you can't really grow the size of it for a bunch of reasons including that growing might move it in memory (realloc) which you can't due to self references...
So you would need the size of the generator when generating it.
Which could somewhat be possible but not really with current rust features, i.e. it would need a lot a special care.