]> git.lizzy.rs Git - rust.git/commitdiff
Remove unnecessary feature gates from const fns
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 11 Dec 2018 09:32:39 +0000 (10:32 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 11 Dec 2018 09:32:39 +0000 (10:32 +0100)
src/libstd/io/lazy.rs
src/libstd/lib.rs
src/libstd/sys/sgx/condvar.rs
src/libstd/sys/sgx/mutex.rs
src/libstd/sys/sgx/rwlock.rs
src/libstd/sys/sgx/waitqueue.rs
src/libstd/sys_common/condvar.rs
src/libstd/sys_common/mutex.rs
src/libstd/sys_common/rwlock.rs

index c2aaeb98907454c069cfd9a88702e23bd1437a7c..24965ff69318435e874eaad52f9dc8a1b58edcc3 100644 (file)
@@ -26,7 +26,6 @@ const fn done<T>() -> *mut Arc<T> { 1_usize as *mut _ }
 unsafe impl<T> Sync for Lazy<T> {}
 
 impl<T> Lazy<T> {
-    #[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Lazy<T> {
         Lazy {
             lock: Mutex::new(),
index 90c8eaf0f7cbce08f9c9bd177f90ed5d12f7682f..1feb6f268fa0f2d4ca1d30c245601beb371c46a9 100644 (file)
 #![feature(libc)]
 #![feature(link_args)]
 #![feature(linkage)]
+#![feature(min_const_unsafe_fn)]
 #![feature(needs_panic_runtime)]
 #![feature(never_type)]
 #![feature(nll)]
index d3e8165f3dfe7d818437d810308f2d5d36a6ca1f..940f50f25b81a5e9e3c1b59277a69d4d3d984b28 100644 (file)
@@ -18,7 +18,6 @@ pub struct Condvar {
 }
 
 impl Condvar {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Condvar {
         Condvar { inner: SpinMutex::new(WaitVariable::new(())) }
     }
index 663361162bc6bbe7d07ae91ae884c129bf28bd2e..994cf91eea0cd6e58e06a9ca48fbbbfe3d0046ea 100644 (file)
@@ -20,7 +20,6 @@ pub struct Mutex {
 
 // Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
 impl Mutex {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Mutex {
         Mutex { inner: SpinMutex::new(WaitVariable::new(false)) }
     }
@@ -79,7 +78,6 @@ pub struct ReentrantMutex {
 }
 
 impl ReentrantMutex {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn uninitialized() -> ReentrantMutex {
         ReentrantMutex {
             inner: SpinMutex::new(WaitVariable::new(ReentrantLock { owner: None, count: 0 }))
index 7b6970b825f93cc71b056e3700acfe886fade64a..a1551dbb53b2ddb4de0eb5dd5438609811ea9ef4 100644 (file)
@@ -21,7 +21,6 @@ pub struct RWLock {
 //unsafe impl Sync for RWLock {} // FIXME
 
 impl RWLock {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> RWLock {
         RWLock {
             readers: SpinMutex::new(WaitVariable::new(None)),
index ec1135ba30c4ba1184c7d978ccb15ae7c1e9a0a1..ef0def13eee882d4e91f5bd2c36b38940bdc6688 100644 (file)
@@ -50,7 +50,6 @@ pub struct WaitVariable<T> {
 }
 
 impl<T> WaitVariable<T> {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new(var: T) -> Self {
         WaitVariable {
             queue: WaitQueue::new(),
@@ -137,7 +136,6 @@ fn drop(&mut self) {
 }
 
 impl WaitQueue {
-    #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Self {
         WaitQueue {
             inner: UnsafeList::new()
@@ -255,7 +253,6 @@ pub struct UnsafeList<T> {
     }
 
     impl<T> UnsafeList<T> {
-        #[unstable(feature = "sgx_internals", issue = "0")] // FIXME: min_const_fn
         pub const fn new() -> Self {
             unsafe {
                 UnsafeList {
index 16bf0803a8dfee293a0c6e20b45ffb87d908aa90..b6f29dd5fc3d3184f6a528fcb36f70b64b3f1051 100644 (file)
@@ -25,7 +25,6 @@ impl Condvar {
     ///
     /// Behavior is undefined if the condition variable is moved after it is
     /// first used with any of the functions below.
-    #[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Condvar { Condvar(imp::Condvar::new()) }
 
     /// Prepares the condition variable for use.
index 87684237638987c805f1c3f7e7baf678a319376c..c6d531c7a1ac59cbb3b641ea96fc645a3b2f6d2d 100644 (file)
@@ -27,7 +27,6 @@ impl Mutex {
     /// Also, until `init` is called, behavior is undefined if this
     /// mutex is ever used reentrantly, i.e., `raw_lock` or `try_lock`
     /// are called by the thread currently holding the lock.
-    #[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> Mutex { Mutex(imp::Mutex::new()) }
 
     /// Prepare the mutex for use.
index a430c254d3c585f608b61fa360562f2a3c7cd74d..71a4f01ec4cab9f2d3edcee78af3373f2484e24f 100644 (file)
@@ -22,7 +22,6 @@ impl RWLock {
     ///
     /// Behavior is undefined if the reader-writer lock is moved after it is
     /// first used with any of the functions below.
-    #[unstable(feature = "sys_internals", issue = "0")] // FIXME: min_const_fn
     pub const fn new() -> RWLock { RWLock(imp::RWLock::new()) }
 
     /// Acquires shared access to the underlying lock, blocking the current