In the nightly Rust it is no longer possible to designate a string literal as String with a "~" character.
In C++, for example, I'm using user-defined literals to concatenate string literals without the crust of mentioning std::string every time:
inline std::string operator"" _s (const char* str, size_t size) {return std::string (str, size);} foo ("Hello, "_s + "world!"); Is there a similar feature existing or planned in Rust to make string literal concatenation less painful than String::from_str ("Hello, ") + "world!"?
123u32123i64instead ofstatic_cast<uint32_t>(123)to promote strong typing. Now, writingString::from_strevery time is like writingstatic_cast<uint32_t>(123)every time.