0

I was testing with subxt and used the latest version. But I encountered this error:

error[E0658]: use of unstable library feature 'once_cell'
   --> .cargo/registry/src/github.com-1ecc6299db9ec823/subxt-signer-0.30.1/src/utils.rs:37:21
    |
37  |                   VAR.get_or_init(|| { $expr }).clone()

When I explicitly ran the tx_basic.rs in the subxt project itself, it failed:

error[E0658]: use of unstable library feature 'once_cell'
   --> signer/src/utils.rs:22:29
    |
22  |                   static VAR: std::sync::OnceLock<$ty> = std::sync::OnceLock::new();
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: signer/src/crypto/secret_uri.rs:125:1
    |
125 | / once_static! {
126 | |     /// Interpret a phrase like:
127 | |     ///
128 | |     /// ```text
...   |
151 | |     }
152 | | }
    | |_- in this macro invocation
    |
    = note: see issue #7

I'm using rustc 1.68.0-nightly (bdb07a8ec 2022-12-11).

1 Answer 1

2

It should be able to run with the latest, so do rustup update

1
  • Yup; OnceCell was added in Rust 1.70. We recently updated our MSRV as it was pointed out that it was somewhat out of date with reality :)
    – jsdw
    Jul 31, 2023 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.