@@ -1059,7 +1059,8 @@ impl String {
1059
1059
#[ inline]
1060
1060
#[ must_use = "`self` will be dropped if the result is not used" ]
1061
1061
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1062
- #[ rustc_const_unstable( feature = "const_vec_string_slice" , issue = "129041" ) ]
1062
+ #[ rustc_const_stable( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION" ) ]
1063
+ #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]
1063
1064
pub const fn into_bytes ( self ) -> Vec < u8 > {
1064
1065
self . vec
1065
1066
}
@@ -1077,7 +1078,7 @@ impl String {
1077
1078
#[ must_use]
1078
1079
#[ stable( feature = "string_as_str" , since = "1.7.0" ) ]
1079
1080
#[ cfg_attr( not( test) , rustc_diagnostic_item = "string_as_str" ) ]
1080
- #[ rustc_const_unstable ( feature = "const_vec_string_slice" , issue = "129041 " ) ]
1081
+ #[ rustc_const_stable ( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION " ) ]
1081
1082
pub const fn as_str ( & self ) -> & str {
1082
1083
// SAFETY: String contents are stipulated to be valid UTF-8, invalid contents are an error
1083
1084
// at construction.
@@ -1175,7 +1176,7 @@ impl String {
1175
1176
#[ inline]
1176
1177
#[ must_use]
1177
1178
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1178
- #[ rustc_const_unstable ( feature = "const_vec_string_slice" , issue = "129041 " ) ]
1179
+ #[ rustc_const_stable ( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION " ) ]
1179
1180
pub const fn capacity ( & self ) -> usize {
1180
1181
self . vec . capacity ( )
1181
1182
}
@@ -1441,7 +1442,7 @@ impl String {
1441
1442
#[ inline]
1442
1443
#[ must_use]
1443
1444
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1444
- #[ rustc_const_unstable ( feature = "const_vec_string_slice" , issue = "129041 " ) ]
1445
+ #[ rustc_const_stable ( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION " ) ]
1445
1446
pub const fn as_bytes ( & self ) -> & [ u8 ] {
1446
1447
self . vec . as_slice ( )
1447
1448
}
@@ -1817,7 +1818,7 @@ impl String {
1817
1818
#[ inline]
1818
1819
#[ must_use]
1819
1820
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1820
- #[ rustc_const_unstable ( feature = "const_vec_string_slice" , issue = "129041 " ) ]
1821
+ #[ rustc_const_stable ( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION " ) ]
1821
1822
#[ rustc_confusables( "length" , "size" ) ]
1822
1823
pub const fn len ( & self ) -> usize {
1823
1824
self . vec . len ( )
@@ -1837,7 +1838,7 @@ impl String {
1837
1838
#[ inline]
1838
1839
#[ must_use]
1839
1840
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1840
- #[ rustc_const_unstable ( feature = "const_vec_string_slice" , issue = "129041 " ) ]
1841
+ #[ rustc_const_stable ( feature = "const_vec_string_slice" , since = "CURRENT_RUSTC_VERSION " ) ]
1841
1842
pub const fn is_empty ( & self ) -> bool {
1842
1843
self . len ( ) == 0
1843
1844
}
0 commit comments