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

impl_hash! is incompatible with 32-bit word size #30

Open
MarquessV opened this issue Sep 6, 2023 · 0 comments
Open

impl_hash! is incompatible with 32-bit word size #30

MarquessV opened this issue Sep 6, 2023 · 0 comments

Comments

@MarquessV
Copy link
Contributor

When building for 32-bit architectures, impl_hash! will cause a compilation failure:

error[E0308]: mismatched types
  --> ...\rigetti-pyo3-a2bd858c711b766b\d77377e\src\traits.rs:66:38
   |
58 | macro_rules! impl_hash {
   | ---------------------- in this expansion of `impl_hash!`
...
66 |                 isize::from_ne_bytes(bytes)
   |                 -------------------- ^^^^^ expected an array with a fixed size of 4 elements, found one with 8 elements
   |                 |
   |                 arguments to this function are incorrect

This is because bytes is the stored result of Hasher::finish, an i64, which can't be used to build an isize on 32-bit systems.

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

No branches or pull requests

1 participant