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

Build Failed: use of unstable library feature 'array_from_fn' #367

Open
yuquan1210 opened this issue Oct 24, 2022 · 5 comments
Open

Build Failed: use of unstable library feature 'array_from_fn' #367

yuquan1210 opened this issue Oct 24, 2022 · 5 comments

Comments

@yuquan1210
Copy link

Summary of Bug

error[E0658]: use of unstable library feature 'array_from_fn'
   --> /root/.cargo/git/checkouts/algebra-7e23afa68841b66e/d3e888d/serialize/src/impls.rs:415:22
    |
415 |         let result = core::array::from_fn(|_| {
    |                      ^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #89379 <https://github.com/rust-lang/rust/issues/89379> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ark-serialize` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

Version

commit f6df807
Update ark-snark to ark-algebra (#366)

Steps to Reproduce

Run build with cargo build --release

Please suggestion a solution for this issue as I am new to Rust and Arkworks. Thank you!

@Pratyush
Copy link
Member

Hi! The error is probably because we've updated the library to use features from a newer (but still stable) version of Rust. If using rustup, I would run rustup update to get the latest stable version of Rust, and this problem should go away.

@yuquan1210
Copy link
Author

My rust should be the latest version, and the problem is still there. Do you have another fix?

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: checking for self-updates

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)

info: cleaning up downloads & tmp directories

@Pratyush
Copy link
Member

Hm can you run rustc --version in your repo? The array_from_fn method is stable as of 1.63: https://doc.rust-lang.org/std/array/fn.from_fn.html

@yuquan1210
Copy link
Author

rustc 1.64.0 (a55dd71d5 2022-09-19). This is the output, and the error showed it is actually using array::from_fn. Is it the same as array_from_fn?

@Pratyush
Copy link
Member

Sorry, I meant the array_from_fn feature was partially stabilized; this stabilization enables the use of array::from_fn on stable.

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

2 participants