Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing CReprOf impls for u8 and i8 #38

Closed
Timmmm opened this issue Feb 21, 2021 · 0 comments · Fixed by #39
Closed

Missing CReprOf impls for u8 and i8 #38

Timmmm opened this issue Feb 21, 2021 · 0 comments · Fixed by #39

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Feb 21, 2021

The code here seems to be a weirdly incomplete list of types, missing u8, i8 and isize in various places. isize might be tricky I guess but u8 is pretty annoying because it means I can't use Vec<u8> which is surely really common?

This is the error you get with Vec<u8>:

error[E0277]: the trait bound `u8: CReprOf<u8>` is not satisfied
  --> src\lib.rs:19:10
   |
19 | #[derive(CReprOf, AsRust, CDrop)]
   |          ^^^^^^^ the trait `CReprOf<u8>` is not implemented for `u8`
   |
   = help: the following implementations were found:
             <u8 as CReprOf<bool>>
   = note: required because of the requirements on the impl of `CReprOf<Vec<u8>>` for `CArray<u8>`
   = note: required by `c_repr_of`

Unfortunately this is impossible to fix in my code because u8 and CReprOf aren't defined by me.

@Timmmm Timmmm mentioned this issue Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant