You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a crate that reexports bytemuck including its derive feature. I also have a derive macro that creates a new struct which should implement Pod and Zeroable. The problem I have is, that I cannot implement those traits on the struct using the safe derive macro because i get the following error:
error[E0433]: failed to resolve: could not find `bytemuck` in the list of imported crate
I assume this error occurs becuase the the crate uses ::bytemuck which always uses bytemuck as an extern crate dependency.
I'd be happy to see some sort of fix here, but I'm not 100% sure that the fix you're proposing is the correct one. At a glance it seems fine. If you make the PR I can certainly point people at it to do the review.
I have a crate that reexports bytemuck including its derive feature. I also have a derive macro that creates a new struct which should implement Pod and Zeroable. The problem I have is, that I cannot implement those traits on the struct using the safe derive macro because i get the following error:
I assume this error occurs becuase the the crate uses
::bytemuck
which always uses bytemuck as an extern crate dependency.serde has a very elegant way to bypass this issue: serde-rs/serde#1465 (comment)
It would be nice to see something like this in the future, so that you can reexport bytemuck and still use the derive macros:
If the dev team would be interested in such a feature, I would be happy to make a pull request.
The text was updated successfully, but these errors were encountered: