ash
ash copied to clipboard
generator: Emit new `c""` `CStr` literals
These ~will land in Rust 1.76~ have landed in Rust 1.77 just now and automatically append a \0
terminator in the compiler without having to have a checked or unsafe
-unchecked constructor on CStr
.
Hacking in an invalid \0
anywhere in the string is disallowed with a compiler error.
Note that proc-macro
, and by extension proc-macro2
only has support for parsing this literal, but not for emitting it yet.
C-string literals have now landed in Rust 1.77.