ash icon indicating copy to clipboard operation
ash copied to clipboard

generator: Emit new `c""` `CStr` literals

Open MarijnS95 opened this issue 1 year ago • 1 comments

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.

MarijnS95 avatar Dec 07 '23 22:12 MarijnS95

C-string literals have now landed in Rust 1.77.

Friz64 avatar Mar 21 '24 13:03 Friz64