How to concatenate static strings in Rust
Since I was essentially trying to emulate C macros, I tried to solve the problem with Rust macros and succeeded: macro_rules! description { () => ( “my program” ) } macro_rules! version { () => ( env!(“CARGO_PKG_VERSION”) ) } macro_rules! version_string { () => ( concat!(description!(), ” v”, version!()) ) } It feels a bit … Read more