File tree Expand file tree Collapse file tree 7 files changed +7
-0
lines changed Expand file tree Collapse file tree 7 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ pub type MovableCondvar = Condvar;
77
88impl Condvar {
99 #[ inline]
10+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
1011 pub const fn new ( ) -> Condvar {
1112 Condvar { }
1213 }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ unsafe impl Sync for Mutex {} // no threads on this platform
1212
1313impl Mutex {
1414 #[ inline]
15+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
1516 pub const fn new ( ) -> Mutex {
1617 Mutex { locked : Cell :: new ( false ) }
1718 }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ unsafe impl Sync for RwLock {} // no threads on this platform
1212
1313impl RwLock {
1414 #[ inline]
15+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
1516 pub const fn new ( ) -> RwLock {
1617 RwLock { mode : Cell :: new ( 0 ) }
1718 }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ pub struct Condvar {
1515impl Condvar {
1616 /// Creates a new condition variable for use.
1717 #[ inline]
18+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
1819 pub const fn new ( ) -> Self {
1920 Self { inner : imp:: MovableCondvar :: new ( ) , check : CondvarCheck :: new ( ) }
2021 }
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ pub struct NoCheck;
5050
5151#[ allow( dead_code) ]
5252impl NoCheck {
53+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
5354 pub const fn new ( ) -> Self {
5455 Self
5556 }
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ unsafe impl Sync for MovableMutex {}
6161impl MovableMutex {
6262 /// Creates a new mutex.
6363 #[ inline]
64+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
6465 pub const fn new ( ) -> Self {
6566 Self ( imp:: MovableMutex :: new ( ) )
6667 }
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ pub struct MovableRwLock(imp::MovableRwLock);
7575impl MovableRwLock {
7676 /// Creates a new reader-writer lock for use.
7777 #[ inline]
78+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
7879 pub const fn new ( ) -> Self {
7980 Self ( imp:: MovableRwLock :: new ( ) )
8081 }
You can’t perform that action at this time.
0 commit comments