@@ -723,7 +723,8 @@ impl<T> Option<T> {
723723/// ``` 
724724#[ inline]  
725725    #[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
726-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
726+     #[ cfg_attr( bootstrap,  rustc_allow_const_fn_unstable( const_mut_refs) ) ]  
727+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
727728    pub  const  fn  as_mut ( & mut  self )  -> Option < & mut  T >  { 
728729        match  * self  { 
729730            Some ( ref  mut  x)  => Some ( x) , 
@@ -924,7 +925,8 @@ impl<T> Option<T> {
924925    #[ track_caller]  
925926    #[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
926927    #[ cfg_attr( not( test) ,  rustc_diagnostic_item = "option_expect" ) ]  
927-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
928+     #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]  
929+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
928930    pub  const  fn  expect ( self ,  msg :  & str )  -> T  { 
929931        match  self  { 
930932            Some ( val)  => val, 
@@ -962,7 +964,8 @@ impl<T> Option<T> {
962964    #[ track_caller]  
963965    #[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
964966    #[ cfg_attr( not( test) ,  rustc_diagnostic_item = "option_unwrap" ) ]  
965-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
967+     #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]  
968+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
966969    pub  const  fn  unwrap ( self )  -> T  { 
967970        match  self  { 
968971            Some ( val)  => val, 
@@ -1069,7 +1072,8 @@ impl<T> Option<T> {
10691072#[ inline]  
10701073    #[ track_caller]  
10711074    #[ stable( feature = "option_result_unwrap_unchecked" ,  since = "1.58.0" ) ]  
1072-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
1075+     #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]  
1076+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
10731077    pub  const  unsafe  fn  unwrap_unchecked ( self )  -> T  { 
10741078        match  self  { 
10751079            Some ( val)  => val, 
@@ -1712,7 +1716,8 @@ impl<T> Option<T> {
17121716/// ``` 
17131717#[ inline]  
17141718    #[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
1715-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
1719+     #[ cfg_attr( bootstrap,  rustc_allow_const_fn_unstable( const_mut_refs) ) ]  
1720+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
17161721    pub  const  fn  take ( & mut  self )  -> Option < T >  { 
17171722        // FIXME(const-hack) replace `mem::replace` by `mem::take` when the latter is const ready 
17181723        mem:: replace ( self ,  None ) 
@@ -1769,8 +1774,9 @@ impl<T> Option<T> {
17691774/// assert_eq!(old, None); 
17701775/// ``` 
17711776#[ inline]  
1772-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
17731777    #[ stable( feature = "option_replace" ,  since = "1.31.0" ) ]  
1778+     #[ cfg_attr( bootstrap,  rustc_allow_const_fn_unstable( const_mut_refs) ) ]  
1779+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
17741780    pub  const  fn  replace ( & mut  self ,  value :  T )  -> Option < T >  { 
17751781        mem:: replace ( self ,  Some ( value) ) 
17761782    } 
@@ -1878,7 +1884,7 @@ impl<T> Option<&T> {
18781884/// ``` 
18791885#[ must_use = "`self` will be dropped if the result is not used" ]  
18801886    #[ stable( feature = "copied" ,  since = "1.35.0" ) ]  
1881-     #[ rustc_const_unstable ( feature = "const_option" ,  issue  = "67441 " ) ]  
1887+     #[ rustc_const_stable ( feature = "const_option" ,  since  = "CURRENT_RUSTC_VERSION " ) ]  
18821888    pub  const  fn  copied ( self )  -> Option < T > 
18831889    where 
18841890        T :  Copy , 
@@ -1931,7 +1937,8 @@ impl<T> Option<&mut T> {
19311937/// ``` 
19321938#[ must_use = "`self` will be dropped if the result is not used" ]  
19331939    #[ stable( feature = "copied" ,  since = "1.35.0" ) ]  
1934-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
1940+     #[ cfg_attr( bootstrap,  rustc_allow_const_fn_unstable( const_mut_refs) ) ]  
1941+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
19351942    pub  const  fn  copied ( self )  -> Option < T > 
19361943    where 
19371944        T :  Copy , 
@@ -1986,7 +1993,8 @@ impl<T, E> Option<Result<T, E>> {
19861993/// ``` 
19871994#[ inline]  
19881995    #[ stable( feature = "transpose_result" ,  since = "1.33.0" ) ]  
1989-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
1996+     #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]  
1997+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
19901998    pub  const  fn  transpose ( self )  -> Result < Option < T > ,  E >  { 
19911999        match  self  { 
19922000            Some ( Ok ( x) )  => Ok ( Some ( x) ) , 
@@ -2009,7 +2017,6 @@ const fn unwrap_failed() -> ! {
20092017#[ cfg_attr( feature = "panic_immediate_abort" ,  inline) ]  
20102018#[ cold]  
20112019#[ track_caller]  
2012- #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
20132020const  fn  expect_failed ( msg :  & str )  -> ! { 
20142021    panic_display ( & msg) 
20152022} 
@@ -2534,7 +2541,8 @@ impl<T> Option<Option<T>> {
25342541/// ``` 
25352542#[ inline]  
25362543    #[ stable( feature = "option_flattening" ,  since = "1.40.0" ) ]  
2537-     #[ rustc_const_unstable( feature = "const_option" ,  issue = "67441" ) ]  
2544+     #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]  
2545+     #[ rustc_const_stable( feature = "const_option" ,  since = "CURRENT_RUSTC_VERSION" ) ]  
25382546    pub  const  fn  flatten ( self )  -> Option < T >  { 
25392547        // FIXME(const-hack): could be written with `and_then` 
25402548        match  self  { 
0 commit comments