Skip to content

Commit a447b4e

Browse files
authored
Rollup merge of rust-lang#123431 - slanterns:literal_byte_character_c_string_stabilize, r=dtolnay
Stabilize `proc_macro_byte_character` and `proc_macro_c_str_literals` This PR stabilizes `proc_macro_byte_character` and `proc_macro_c_str_literals`: ```rust // proc_macro::Literal impl Literal { pub fn byte_character(byte: u8) -> Literal; pub fn c_string(string: &CStr) -> Literal } ``` <br> Tracking issue: rust-lang#115268, rust-lang#119750. Implementation PR: rust-lang#112711, rust-lang#119651. FCPs already completed in their respective tracking issues. Closes rust-lang#115268. Closes rust-lang#119750. r? libs-api
2 parents 3376f7f + 9731fdd commit a447b4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proc_macro/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ impl Literal {
13601360
}
13611361

13621362
/// Byte character literal.
1363-
#[unstable(feature = "proc_macro_byte_character", issue = "115268")]
1363+
#[stable(feature = "proc_macro_byte_character", since = "CURRENT_RUSTC_VERSION")]
13641364
pub fn byte_character(byte: u8) -> Literal {
13651365
let string = [byte].escape_ascii().to_string();
13661366
Literal::new(bridge::LitKind::Byte, &string, None)
@@ -1374,7 +1374,7 @@ impl Literal {
13741374
}
13751375

13761376
/// C string literal.
1377-
#[unstable(feature = "proc_macro_c_str_literals", issue = "119750")]
1377+
#[stable(feature = "proc_macro_c_str_literals", since = "CURRENT_RUSTC_VERSION")]
13781378
pub fn c_string(string: &CStr) -> Literal {
13791379
let string = string.to_bytes().escape_ascii().to_string();
13801380
Literal::new(bridge::LitKind::CStr, &string, None)

0 commit comments

Comments
 (0)