Stabilize Literal::c_string
This commit is contained in:
@@ -1374,7 +1374,7 @@ impl Literal {
|
||||
}
|
||||
|
||||
/// C string literal.
|
||||
#[unstable(feature = "proc_macro_c_str_literals", issue = "119750")]
|
||||
#[stable(feature = "proc_macro_c_str_literals", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub fn c_string(string: &CStr) -> Literal {
|
||||
let string = string.to_bytes().escape_ascii().to_string();
|
||||
Literal::new(bridge::LitKind::CStr, &string, None)
|
||||
|
||||
Reference in New Issue
Block a user