Skip to content

Commit

Permalink
Stabilize Literal::c_string
Browse files Browse the repository at this point in the history
  • Loading branch information
slanterns committed Apr 3, 2024
1 parent 61ac781 commit fbc56df
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion library/proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/ui/proc-macro/auxiliary/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![crate_type = "proc-macro"]
#![crate_name = "proc_macro_api_tests"]
#![feature(proc_macro_span)]
#![feature(proc_macro_c_str_literals)]
#![deny(dead_code)] // catch if a test function is never called

extern crate proc_macro;
Expand Down

0 comments on commit fbc56df

Please sign in to comment.