Closed
Description
This is a tracking issue for the RFC "c"…"
string literals" (rust-lang/rfcs#3348).
The feature gate for the issue is #![feature(c_str_literals)]
.
Steps / History
- Implement the RFC: Implement RFC 3348,
c"foo"
literals #108801 - Interaction with proc macros:
c"…"
literals are handled incorrectly by proc_macro::Literal #112820 - regression: c"..." are experimental #113235
- Revert the lexing of
c"…"
string literals #113334 - Reimplement the lexing of
c"…"
string literals with backward compatibility in mind #113333 - proc_macro does not have a constructor for c string literals #118560
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR Stabilize C string literals #117472
Unresolved Questions
- Also add
c'…'
C character literals? (u8
,i8
,c_char
, or something more flexible?) - Should we make
&CStr
a thin pointer before stabilizing this? (If so, how?) - Should the (unstable)
concat_bytes
macro accept C string literals? (If so, should it evaluate to a C string or byte string?) - Should there be a valid UTF-8 C string type that
c"..."
string literals support? (comment 1, comment 2)