File tree 7 files changed +7
-0
lines changed
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;
7
7
8
8
impl Condvar {
9
9
#[ inline]
10
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
10
11
pub const fn new ( ) -> Condvar {
11
12
Condvar { }
12
13
}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ unsafe impl Sync for Mutex {} // no threads on this platform
12
12
13
13
impl Mutex {
14
14
#[ inline]
15
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
15
16
pub const fn new ( ) -> Mutex {
16
17
Mutex { locked : Cell :: new ( false ) }
17
18
}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ unsafe impl Sync for RwLock {} // no threads on this platform
12
12
13
13
impl RwLock {
14
14
#[ inline]
15
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
15
16
pub const fn new ( ) -> RwLock {
16
17
RwLock { mode : Cell :: new ( 0 ) }
17
18
}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ pub struct Condvar {
15
15
impl Condvar {
16
16
/// Creates a new condition variable for use.
17
17
#[ inline]
18
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
18
19
pub const fn new ( ) -> Self {
19
20
Self { inner : imp:: MovableCondvar :: new ( ) , check : CondvarCheck :: new ( ) }
20
21
}
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ pub struct NoCheck;
50
50
51
51
#[ allow( dead_code) ]
52
52
impl NoCheck {
53
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
53
54
pub const fn new ( ) -> Self {
54
55
Self
55
56
}
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ unsafe impl Sync for MovableMutex {}
61
61
impl MovableMutex {
62
62
/// Creates a new mutex.
63
63
#[ inline]
64
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
64
65
pub const fn new ( ) -> Self {
65
66
Self ( imp:: MovableMutex :: new ( ) )
66
67
}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ pub struct MovableRwLock(imp::MovableRwLock);
75
75
impl MovableRwLock {
76
76
/// Creates a new reader-writer lock for use.
77
77
#[ inline]
78
+ #[ rustc_const_stable( feature = "const_locks" , since = "1.63.0" ) ]
78
79
pub const fn new ( ) -> Self {
79
80
Self ( imp:: MovableRwLock :: new ( ) )
80
81
}
You can’t perform that action at this time.
0 commit comments