all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rust packaging with specific version of rust
@ 2020-10-19  8:30 Hamzeh Nasajpour
  2020-10-19  9:06 ` Arun Isaac
  0 siblings, 1 reply; 3+ messages in thread
From: Hamzeh Nasajpour @ 2020-10-19  8:30 UTC (permalink / raw)
  To: SuarezMiguelC via

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rust packaging with specific version of rust
  2020-10-19  8:30 rust packaging with specific version of rust Hamzeh Nasajpour
@ 2020-10-19  9:06 ` Arun Isaac
  2020-10-21 11:11   ` Hamzeh Nasajpour
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Isaac @ 2020-10-19  9:06 UTC (permalink / raw)
  To: Hamzeh Nasajpour, SuarezMiguelC via


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rust packaging with specific version of rust
  2020-10-19  9:06 ` Arun Isaac
@ 2020-10-21 11:11   ` Hamzeh Nasajpour
  0 siblings, 0 replies; 3+ messages in thread
From: Hamzeh Nasajpour @ 2020-10-21 11:11 UTC (permalink / raw)
  To: Arun Isaac, SuarezMiguelC via

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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-21 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-19  8:30 rust packaging with specific version of rust Hamzeh Nasajpour
2020-10-19  9:06 ` Arun Isaac
2020-10-21 11:11   ` Hamzeh Nasajpour

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.