paritytech / libsecp256k1

Pure Rust Implementation of secp256k1.
Apache License 2.0
175 stars 84 forks source link

rustc error due to arrayref dependency #98

Closed I-mikan-I closed 2 years ago

I-mikan-I commented 2 years ago

Rustup seems to now throw a compile time error when trying to compile a crate with libsecp256k1 as a dependency.

This causes stable builds with libsecp256k1 to fail.

Description

During compilation, the error:

use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
  --> /home/mikn/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayref-0.3.6/src/lib.rs:35:5
   |
35 | use core::intrinsics::prefetch_write_data;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

occurs, which seems to originate from the arrayref transitive dependency (through libsecp256k1 0.7.0).

Reproduction

Compile a package with the libsecp256k1 dependency using cargo.

Setup

WSL2 toolchain:

stable-x86_64-unknown-linux-gnu (default)
rustc 1.56.1 (59eed8a2a 2021-11-01)
I-mikan-I commented 2 years ago

So deleting my ~/.cargo/registry/ seems to have "fixed" the issue... I have no idea how this could have happened, as i made sure the cargo.lock hash sum for arrayref remained the same, and the same toolchain was used.