These are chat archives for rust-lang/rust

Dec 2018
Dec 21 2018 00:59
Is there any way to set some custom variable while building? I tried env::set_var in but the env::var couldn’t read the var.
Dec 21 2018 05:24
how active is this groupchat?
Björn Lindström
Dec 21 2018 05:26
S1nus, less so than the chats at
Denis Lisov
Dec 21 2018 07:48
@AllowFlame If you want the variable to be available at compile time, you should use rustc-env in your output and access it from the source with the env! macro.
Dec 21 2018 08:33
@tanriol Thank you. And I have one more curiosity about it. Do I have to edit some files such as .cargo/config or Cargo.toml to do it?
Denis Lisov
Dec 21 2018 08:46
Nope, should just work.
Dec 21 2018 12:25
Thank you. :)
Dec 21 2018 18:38

Hello :) How can i create new struct based on existing?

fname: self.fname,
| ^^^^^^^^^^ cannot move out of borrowed content

Should i somehow copy fname?