Skip to content

Commit 300da0f

Browse files
Stabilize proc_macro_value feature
1 parent 5ff740e commit 300da0f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

library/proc_macro/src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ use crate::bridge::client::Methods as BridgeMethods;
6666
use crate::escape::{EscapeOptions, escape_bytes};
6767

6868
/// Mostly relating to malformed escape sequences, but also a few other problems.
69-
#[unstable(feature = "proc_macro_value", issue = "136652")]
69+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
7070
#[derive(Debug, PartialEq, Eq)]
7171
#[non_exhaustive]
7272
pub enum EscapeError {
@@ -126,7 +126,7 @@ pub enum EscapeError {
126126
MultipleSkippedLinesWarning,
127127
}
128128

129-
#[unstable(feature = "proc_macro_value", issue = "136652")]
129+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
130130
#[doc(hidden)]
131131
impl From<rustc_literal_escaper::EscapeError> for EscapeError {
132132
fn from(value: rustc_literal_escaper::EscapeError) -> Self {
@@ -160,10 +160,10 @@ impl From<rustc_literal_escaper::EscapeError> for EscapeError {
160160
}
161161
}
162162

163-
#[unstable(feature = "proc_macro_value", issue = "136652")]
163+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
164164
impl error::Error for EscapeError {}
165165

166-
#[unstable(feature = "proc_macro_value", issue = "136652")]
166+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
167167
impl fmt::Display for EscapeError {
168168
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
169169
f.write_str(match self {
@@ -195,7 +195,7 @@ impl fmt::Display for EscapeError {
195195
}
196196

197197
/// Errors returned when trying to retrieve a literal unescaped value.
198-
#[unstable(feature = "proc_macro_value", issue = "136652")]
198+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
199199
#[derive(Debug, PartialEq, Eq)]
200200
pub enum ConversionErrorKind {
201201
/// The literal failed to be escaped, take a look at [`EscapeError`] for more information.
@@ -1322,7 +1322,7 @@ macro_rules! integer_values {
13221322
"` value if the literal is a `",
13231323
stringify!($nb),
13241324
"` or if it's an \"unmarked\" integer which doesn't overflow.")]
1325-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1325+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
13261326
pub fn $fn_name(&self) -> Result<$nb, ConversionErrorKind> {
13271327
if self.0.kind != bridge::LitKind::Integer {
13281328
return Err(ConversionErrorKind::InvalidLiteralKind);
@@ -1351,7 +1351,7 @@ macro_rules! float_values {
13511351
"` value if the literal is a `",
13521352
stringify!($nb),
13531353
"` or if it's an \"unmarked\" float which doesn't overflow.")]
1354-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1354+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
13551355
pub fn $fn_name(&self) -> Result<$nb, ConversionErrorKind> {
13561356
if self.0.kind != bridge::LitKind::Float {
13571357
return Err(ConversionErrorKind::InvalidLiteralKind);
@@ -1645,7 +1645,7 @@ impl Literal {
16451645
}
16461646

16471647
/// Returns the unescaped character value if the current literal is a byte character literal.
1648-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1648+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
16491649
pub fn byte_character_value(&self) -> Result<u8, ConversionErrorKind> {
16501650
self.0.symbol.with(|symbol| match self.0.kind {
16511651
bridge::LitKind::Byte => unescape_byte(symbol)
@@ -1655,7 +1655,7 @@ impl Literal {
16551655
}
16561656

16571657
/// Returns the unescaped character value if the current literal is a character literal.
1658-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1658+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
16591659
pub fn character_value(&self) -> Result<char, ConversionErrorKind> {
16601660
self.0.symbol.with(|symbol| match self.0.kind {
16611661
bridge::LitKind::Char => unescape_char(symbol)
@@ -1665,7 +1665,7 @@ impl Literal {
16651665
}
16661666

16671667
/// Returns the unescaped string value if the current literal is a string or a string literal.
1668-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1668+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
16691669
pub fn str_value(&self) -> Result<String, ConversionErrorKind> {
16701670
self.0.symbol.with(|symbol| match self.0.kind {
16711671
bridge::LitKind::Str => {
@@ -1699,7 +1699,7 @@ impl Literal {
16991699

17001700
/// Returns the unescaped string value if the current literal is a c-string or a c-string
17011701
/// literal.
1702-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1702+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
17031703
pub fn cstr_value(&self) -> Result<Vec<u8>, ConversionErrorKind> {
17041704
self.0.symbol.with(|symbol| match self.0.kind {
17051705
bridge::LitKind::CStr => {
@@ -1738,7 +1738,7 @@ impl Literal {
17381738

17391739
/// Returns the unescaped string value if the current literal is a byte string or a byte string
17401740
/// literal.
1741-
#[unstable(feature = "proc_macro_value", issue = "136652")]
1741+
#[stable(feature = "proc_macro_value", since = "CURRENT_RUSTC_VERSION")]
17421742
pub fn byte_str_value(&self) -> Result<Vec<u8>, ConversionErrorKind> {
17431743
self.0.symbol.with(|symbol| match self.0.kind {
17441744
bridge::LitKind::ByteStr => {

0 commit comments

Comments
 (0)