@@ -78,15 +78,11 @@ impl bool {
7878 /// # Examples
7979 ///
8080 /// ```
81- /// #![feature(bool_to_result)]
82- ///
8381 /// assert_eq!(false.ok_or(0), Err(0));
8482 /// assert_eq!(true.ok_or(0), Ok(()));
8583 /// ```
8684 ///
8785 /// ```
88- /// #![feature(bool_to_result)]
89- ///
9086 /// let mut a = 0;
9187 /// let mut function_with_side_effects = || { a += 1; };
9288 ///
@@ -97,7 +93,7 @@ impl bool {
9793 /// // evaluated eagerly.
9894 /// assert_eq!(a, 2);
9995 /// ```
100- #[ unstable ( feature = "bool_to_result" , issue = "142748 " ) ]
96+ #[ stable ( feature = "bool_to_result" , since = "CURRENT_RUSTC_VERSION " ) ]
10197 #[ rustc_const_unstable( feature = "const_bool" , issue = "151531" ) ]
10298 #[ inline]
10399 pub const fn ok_or<E : [ const ] Destruct > ( self , err : E ) -> Result < ( ) , E > {
@@ -110,15 +106,11 @@ impl bool {
110106 /// # Examples
111107 ///
112108 /// ```
113- /// #![feature(bool_to_result)]
114- ///
115109 /// assert_eq!(false.ok_or_else(|| 0), Err(0));
116110 /// assert_eq!(true.ok_or_else(|| 0), Ok(()));
117111 /// ```
118112 ///
119113 /// ```
120- /// #![feature(bool_to_result)]
121- ///
122114 /// let mut a = 0;
123115 ///
124116 /// assert!(true.ok_or_else(|| { a += 1; }).is_ok());
@@ -128,7 +120,7 @@ impl bool {
128120 /// // `ok_or_else`.
129121 /// assert_eq!(a, 1);
130122 /// ```
131- #[ unstable ( feature = "bool_to_result" , issue = "142748 " ) ]
123+ #[ stable ( feature = "bool_to_result" , since = "CURRENT_RUSTC_VERSION " ) ]
132124 #[ rustc_const_unstable( feature = "const_bool" , issue = "151531" ) ]
133125 #[ inline]
134126 pub const fn ok_or_else<E , F : [ const ] FnOnce ( ) -> E + [ const ] Destruct >(
0 commit comments