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

Compilation error in rust version 1.36.0 #39

Closed
abitrolly opened this issue Aug 1, 2019 · 0 comments · Fixed by #38
Closed

Compilation error in rust version 1.36.0 #39

abitrolly opened this issue Aug 1, 2019 · 0 comments · Fixed by #38

Comments

@abitrolly
Copy link

Ubuntu build currently fails.

...
   Compiling ethereum-bn128 v0.1.0 (https://github.com/ewasm/ethereum-bn128.rs#10968881)
   Compiling rustbn-js v0.1.2 (/home/travis/build/ethereumjs/rustbn.js)
error[E0308]: mismatched types
  --> src/main.rs:20:56
   |
20 |     match ethereum_bn128::bn128_mul(&input_parsed[..], &mut BytesRef::Fixed(&mut output[..])) {
   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected array of 64 elements, found enum `bytes::BytesRef`
   |
   = note: expected type `&mut [u8; 64]`
              found type `&mut bytes::BytesRef<'_>`

error[E0308]: mismatched types
  --> src/main.rs:37:56
   |
37 |     match ethereum_bn128::bn128_add(&input_parsed[..], &mut BytesRef::Fixed(&mut output[..])) {
   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected array of 64 elements, found enum `bytes::BytesRef`
   |
   = note: expected type `&mut [u8; 64]`
              found type `&mut bytes::BytesRef<'_>`

error[E0308]: mismatched types
  --> src/main.rs:54:60
   |
54 |     match ethereum_bn128::bn128_pairing(&input_parsed[..], &mut BytesRef::Fixed(&mut output[..])) {
   |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected array of 32 elements, found enum `bytes::BytesRef`
   |
   = note: expected type `&mut [u8; 32]`
              found type `&mut bytes::BytesRef<'_>`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.

error: Could not compile `rustbn-js`.

To learn more, run the command again with --verbose.

Makefile:4: recipe for target 'all' failed
make: *** [all] Error 101
The command "make" exited with 2.
...
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