Hi, I'm not expert in `rust`. I need to work with a library that has some dependencies to rust and I had to package a few libraries in GuixSD. Anyway now I faced with an error in building one rust package: ``` error[E0658]: use of unstable library feature 'inner_deref': newly added --> src/http_client/mod.rs:54:25 | 54 | self.auth_token.as_deref() | ^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/50264 error[E0658]: use of unstable library feature 'inner_deref': newly added --> src/http_client/mod.rs:68:43 | 68 | self.imp.get(url, self.auth_token.as_deref()).as_result() | ^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/50264 error[E0658]: use of unstable library feature 'inner_deref': newly added --> src/http_client/mod.rs:72:44 | 72 | self.imp.post(url, self.auth_token.as_deref(), body).as_result() | ^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/50264 ... ``` Based on the following document the `as_deref()` method is available since rust version `1.40.0`. https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref Now how can I build/install my rust package with this specific version? is it possible? or is there anything that I forget? Please help. Regards, Hamzeh
To enable the unstable inner_deref feature, you need to add the line "#![feature(inner_deref)]" to the top of src/lib.rs. And, you might need to enable unstable features by setting the environment variable RUSTC_BOOTSTRAP to 1. See the rust-sourcemap package in gnu/package/crates-io.scm for an example. Cheers! Arun
Hi,
Thanks for your quick and helpful reply.
The problem resolved.
Regards,
Hamzeh
On Mon, Oct 19, 2020, at 12:36 PM, Arun Isaac wrote:
>
> To enable the unstable inner_deref feature, you need to add the line
> "#![feature(inner_deref)]" to the top of src/lib.rs. And, you might need
> to enable unstable features by setting the environment variable
> RUSTC_BOOTSTRAP to 1. See the rust-sourcemap package in
> gnu/package/crates-io.scm for an example.
>
> Cheers!
> Arun
>