Closed enjhnsn2 closed 2 months ago
The issue is that the macro is trying to generate this:
struct __FluxExternImplStruct1Iter<'a, T>('a, T, std::slice::Iter<'a, T>);
which is obviously not valid Rust syntax.
I need to think for a moment about why we are adding the generics as fields. Ranjit wrote that code...
hmmmm, curious. Well that makes sense why it doesn't like the lifetime there, although I have no clue how to fix this.
I'm preparing a fix
When I try to create the extern_spec:
it crashes with:
I spent some time debugging this issue, and it fails on this line in flux: https://github.com/flux-rs/flux/blob/461f75c0508e159f3c76336eaf1494b8bab25290/lib/flux-attrs/src/extern_spec.rs#L122
and triggers this error in syn: https://github.com/dtolnay/syn/blob/3c24f576d7e1655da51bac4a6f80ded898fb9840/src/ty.rs#L840-L843
This means that somehow the lifetime is getting mistaken for a TraitBound. I have no idea how this is happening though, because
#params
and#self_ty
look completely reasonable.\ params:self_ty:
If you have any input, that would be much appreciated, as I'm pretty stumped.