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