1
Fork 0

Stabilize Literal::byte_character

This commit is contained in:
Slanterns 2024-04-04 05:00:49 +08:00
parent 98efd808e1
commit 61ac7812c6
No known key found for this signature in database
GPG key ID: 1AA37EE7FAAE433A
4 changed files with 1 additions and 25 deletions

View file

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