Skip to content

Commit 799cadb

Browse files
committed
Remove unnecessary feature gates from const fns
1 parent 4c0116e commit 799cadb

File tree

9 files changed

+1
-11
lines changed

9 files changed

+1
-11
lines changed

src/libstd/io/lazy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const fn done<T>() -> *mut Arc<T> { 1_usize as *mut _ }
2626
unsafe impl<T> Sync for Lazy<T> {}
2727

2828
impl<T> Lazy<T> {
29-
#[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
3029
pub const fn new() -> Lazy<T> {
3130
Lazy {
3231
lock: Mutex::new(),

src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
#![feature(libc)]
272272
#![feature(link_args)]
273273
#![feature(linkage)]
274+
#![feature(min_const_unsafe_fn)]
274275
#![feature(needs_panic_runtime)]
275276
#![feature(never_type)]
276277
#![feature(nll)]

src/libstd/sys/sgx/condvar.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub struct Condvar {
1818
}
1919

2020
impl Condvar {
21-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
2221
pub const fn new() -> Condvar {
2322
Condvar { inner: SpinMutex::new(WaitVariable::new(())) }
2423
}

src/libstd/sys/sgx/mutex.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub struct Mutex {
2020

2121
// Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
2222
impl Mutex {
23-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
2423
pub const fn new() -> Mutex {
2524
Mutex { inner: SpinMutex::new(WaitVariable::new(false)) }
2625
}
@@ -79,7 +78,6 @@ pub struct ReentrantMutex {
7978
}
8079

8180
impl ReentrantMutex {
82-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
8381
pub const fn uninitialized() -> ReentrantMutex {
8482
ReentrantMutex {
8583
inner: SpinMutex::new(WaitVariable::new(ReentrantLock { owner: None, count: 0 }))

src/libstd/sys/sgx/rwlock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub struct RWLock {
2121
//unsafe impl Sync for RWLock {} // FIXME
2222

2323
impl RWLock {
24-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
2524
pub const fn new() -> RWLock {
2625
RWLock {
2726
readers: SpinMutex::new(WaitVariable::new(None)),

src/libstd/sys/sgx/waitqueue.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ pub struct WaitVariable<T> {
5050
}
5151

5252
impl<T> WaitVariable<T> {
53-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
5453
pub const fn new(var: T) -> Self {
5554
WaitVariable {
5655
queue: WaitQueue::new(),
@@ -137,7 +136,6 @@ impl<'a, T> Drop for WaitGuard<'a, T> {
137136
}
138137

139138
impl WaitQueue {
140-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
141139
pub const fn new() -> Self {
142140
WaitQueue {
143141
inner: UnsafeList::new()
@@ -255,7 +253,6 @@ mod unsafe_list {
255253
}
256254

257255
impl<T> UnsafeList<T> {
258-
#[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
259256
pub const fn new() -> Self {
260257
unsafe {
261258
UnsafeList {

src/libstd/sys_common/condvar.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ impl Condvar {
2525
///
2626
/// Behavior is undefined if the condition variable is moved after it is
2727
/// first used with any of the functions below.
28-
#[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
2928
pub const fn new() -> Condvar { Condvar(imp::Condvar::new()) }
3029

3130
/// Prepares the condition variable for use.

src/libstd/sys_common/mutex.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ impl Mutex {
2727
/// Also, until `init` is called, behavior is undefined if this
2828
/// mutex is ever used reentrantly, i.e., `raw_lock` or `try_lock`
2929
/// are called by the thread currently holding the lock.
30-
#[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
3130
pub const fn new() -> Mutex { Mutex(imp::Mutex::new()) }
3231

3332
/// Prepare the mutex for use.

src/libstd/sys_common/rwlock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ impl RWLock {
2222
///
2323
/// Behavior is undefined if the reader-writer lock is moved after it is
2424
/// first used with any of the functions below.
25-
#[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
2625
pub const fn new() -> RWLock { RWLock(imp::RWLock::new()) }
2726

2827
/// Acquires shared access to the underlying lock, blocking the current

0 commit comments

Comments
 (0)