@@ -241,6 +241,7 @@ impl AtomicBool {
241241 /// ```
242242 #[ inline]
243243 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
244+ #[ cfg_attr( not( stage0) , rustc_const_unstable( feature = "const_atomic_bool_new" ) ) ]
244245 pub const fn new ( v : bool ) -> AtomicBool {
245246 AtomicBool { v : UnsafeCell :: new ( v as u8 ) }
246247 }
@@ -649,6 +650,7 @@ impl<T> AtomicPtr<T> {
649650 /// ```
650651 #[ inline]
651652 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
653+ #[ cfg_attr( not( stage0) , rustc_const_unstable( feature = "const_atomic_ptr_new" ) ) ]
652654 pub const fn new ( p : * mut T ) -> AtomicPtr < T > {
653655 AtomicPtr { p : UnsafeCell :: new ( p) }
654656 }
@@ -920,7 +922,7 @@ impl<T> AtomicPtr<T> {
920922
921923#[ cfg( target_has_atomic = "ptr" ) ]
922924macro_rules! atomic_int {
923- ( $stable: meta,
925+ ( $stable: meta, $const_unstable : meta ,
924926 $stable_cxchg: meta,
925927 $stable_debug: meta,
926928 $stable_access: meta,
@@ -969,6 +971,7 @@ macro_rules! atomic_int {
969971 /// ```
970972 #[ inline]
971973 #[ $stable]
974+ #[ cfg_attr( not( stage0) , $const_unstable) ]
972975 pub const fn new( v: $int_type) -> Self {
973976 $atomic_type { v: UnsafeCell :: new( v) }
974977 }
@@ -1332,6 +1335,7 @@ macro_rules! atomic_int {
13321335#[ cfg( target_has_atomic = "8" ) ]
13331336atomic_int ! {
13341337 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1338+ rustc_const_unstable( feature = "const_atomic_i8_new" ) ,
13351339 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13361340 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13371341 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1340,6 +1344,7 @@ atomic_int! {
13401344#[ cfg( target_has_atomic = "8" ) ]
13411345atomic_int ! {
13421346 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1347+ rustc_const_unstable( feature = "const_atomic_u8_new" ) ,
13431348 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13441349 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13451350 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1348,6 +1353,7 @@ atomic_int! {
13481353#[ cfg( target_has_atomic = "16" ) ]
13491354atomic_int ! {
13501355 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1356+ rustc_const_unstable( feature = "const_atomic_i16_new" ) ,
13511357 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13521358 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13531359 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1356,6 +1362,7 @@ atomic_int! {
13561362#[ cfg( target_has_atomic = "16" ) ]
13571363atomic_int ! {
13581364 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1365+ rustc_const_unstable( feature = "const_atomic_u16_new" ) ,
13591366 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13601367 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13611368 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1364,6 +1371,7 @@ atomic_int! {
13641371#[ cfg( target_has_atomic = "32" ) ]
13651372atomic_int ! {
13661373 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1374+ rustc_const_unstable( feature = "const_atomic_i32_new" ) ,
13671375 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13681376 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13691377 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1372,6 +1380,7 @@ atomic_int! {
13721380#[ cfg( target_has_atomic = "32" ) ]
13731381atomic_int ! {
13741382 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1383+ rustc_const_unstable( feature = "const_atomic_u32_new" ) ,
13751384 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13761385 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13771386 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1380,6 +1389,7 @@ atomic_int! {
13801389#[ cfg( target_has_atomic = "64" ) ]
13811390atomic_int ! {
13821391 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1392+ rustc_const_unstable( feature = "const_atomic_i64_new" ) ,
13831393 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13841394 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13851395 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1388,6 +1398,7 @@ atomic_int! {
13881398#[ cfg( target_has_atomic = "64" ) ]
13891399atomic_int ! {
13901400 unstable( feature = "integer_atomics" , issue = "32976" ) ,
1401+ rustc_const_unstable( feature = "const_atomic_u64_new" ) ,
13911402 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13921403 unstable( feature = "integer_atomics" , issue = "32976" ) ,
13931404 unstable( feature = "integer_atomics" , issue = "32976" ) ,
@@ -1396,6 +1407,7 @@ atomic_int! {
13961407#[ cfg( target_has_atomic = "ptr" ) ]
13971408atomic_int ! {
13981409 stable( feature = "rust1" , since = "1.0.0" ) ,
1410+ rustc_const_unstable( feature = "const_atomic_isize_new" ) ,
13991411 stable( feature = "extended_compare_and_swap" , since = "1.10.0" ) ,
14001412 stable( feature = "atomic_debug" , since = "1.3.0" ) ,
14011413 stable( feature = "atomic_access" , since = "1.15.0" ) ,
@@ -1404,6 +1416,7 @@ atomic_int!{
14041416#[ cfg( target_has_atomic = "ptr" ) ]
14051417atomic_int ! {
14061418 stable( feature = "rust1" , since = "1.0.0" ) ,
1419+ rustc_const_unstable( feature = "const_atomic_usize_new" ) ,
14071420 stable( feature = "extended_compare_and_swap" , since = "1.10.0" ) ,
14081421 stable( feature = "atomic_debug" , since = "1.3.0" ) ,
14091422 stable( feature = "atomic_access" , since = "1.15.0" ) ,
0 commit comments