@@ -1059,7 +1059,8 @@ impl String {
10591059 #[ inline]
10601060 #[ must_use = "`self` will be dropped if the result is not used" ]
10611061 #[ 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) ]
10631064 pub const fn into_bytes ( self ) -> Vec < u8 > {
10641065 self . vec
10651066 }
@@ -1077,7 +1078,7 @@ impl String {
10771078 #[ must_use]
10781079 #[ stable( feature = "string_as_str" , since = "1.7.0" ) ]
10791080 #[ 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 " ) ]
10811082 pub const fn as_str ( & self ) -> & str {
10821083 // SAFETY: String contents are stipulated to be valid UTF-8, invalid contents are an error
10831084 // at construction.
@@ -1175,7 +1176,7 @@ impl String {
11751176 #[ inline]
11761177 #[ must_use]
11771178 #[ 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 " ) ]
11791180 pub const fn capacity ( & self ) -> usize {
11801181 self . vec . capacity ( )
11811182 }
@@ -1441,7 +1442,7 @@ impl String {
14411442 #[ inline]
14421443 #[ must_use]
14431444 #[ 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 " ) ]
14451446 pub const fn as_bytes ( & self ) -> & [ u8 ] {
14461447 self . vec . as_slice ( )
14471448 }
@@ -1817,7 +1818,7 @@ impl String {
18171818 #[ inline]
18181819 #[ must_use]
18191820 #[ 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 " ) ]
18211822 #[ rustc_confusables( "length" , "size" ) ]
18221823 pub const fn len ( & self ) -> usize {
18231824 self . vec . len ( )
@@ -1837,7 +1838,7 @@ impl String {
18371838 #[ inline]
18381839 #[ must_use]
18391840 #[ 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 " ) ]
18411842 pub const fn is_empty ( & self ) -> bool {
18421843 self . len ( ) == 0
18431844 }
0 commit comments