@@ -1878,7 +1878,6 @@ using [`Release`] makes the load part [`Relaxed`].
1878
1878
# Examples
1879
1879
1880
1880
```
1881
- #![feature(atomic_min_max)]
1882
1881
" , $extra_feature, "use std::sync::atomic::{" , stringify!( $atomic_type) , ", Ordering};
1883
1882
1884
1883
let foo = " , stringify!( $atomic_type) , "::new(23);
@@ -1889,7 +1888,6 @@ assert_eq!(foo.load(Ordering::SeqCst), 42);
1889
1888
If you want to obtain the maximum value in one step, you can use the following:
1890
1889
1891
1890
```
1892
- #![feature(atomic_min_max)]
1893
1891
" , $extra_feature, "use std::sync::atomic::{" , stringify!( $atomic_type) , ", Ordering};
1894
1892
1895
1893
let foo = " , stringify!( $atomic_type) , "::new(23);
@@ -1898,9 +1896,7 @@ let max_foo = foo.fetch_max(bar, Ordering::SeqCst).max(bar);
1898
1896
assert!(max_foo == 42);
1899
1897
```" ) ,
1900
1898
#[ inline]
1901
- #[ unstable( feature = "atomic_min_max" ,
1902
- reason = "easier and faster min/max than writing manual CAS loop" ,
1903
- issue = "48655" ) ]
1899
+ #[ stable( feature = "atomic_min_max" , since = "1.45.0" ) ]
1904
1900
#[ $cfg_cas]
1905
1901
pub fn fetch_max( & self , val: $int_type, order: Ordering ) -> $int_type {
1906
1902
// SAFETY: data races are prevented by atomic intrinsics.
@@ -1929,7 +1925,6 @@ using [`Release`] makes the load part [`Relaxed`].
1929
1925
# Examples
1930
1926
1931
1927
```
1932
- #![feature(atomic_min_max)]
1933
1928
" , $extra_feature, "use std::sync::atomic::{" , stringify!( $atomic_type) , ", Ordering};
1934
1929
1935
1930
let foo = " , stringify!( $atomic_type) , "::new(23);
@@ -1942,7 +1937,6 @@ assert_eq!(foo.load(Ordering::Relaxed), 22);
1942
1937
If you want to obtain the minimum value in one step, you can use the following:
1943
1938
1944
1939
```
1945
- #![feature(atomic_min_max)]
1946
1940
" , $extra_feature, "use std::sync::atomic::{" , stringify!( $atomic_type) , ", Ordering};
1947
1941
1948
1942
let foo = " , stringify!( $atomic_type) , "::new(23);
@@ -1951,9 +1945,7 @@ let min_foo = foo.fetch_min(bar, Ordering::SeqCst).min(bar);
1951
1945
assert_eq!(min_foo, 12);
1952
1946
```" ) ,
1953
1947
#[ inline]
1954
- #[ unstable( feature = "atomic_min_max" ,
1955
- reason = "easier and faster min/max than writing manual CAS loop" ,
1956
- issue = "48655" ) ]
1948
+ #[ stable( feature = "atomic_min_max" , since = "1.45.0" ) ]
1957
1949
#[ $cfg_cas]
1958
1950
pub fn fetch_min( & self , val: $int_type, order: Ordering ) -> $int_type {
1959
1951
// SAFETY: data races are prevented by atomic intrinsics.
0 commit comments