about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-18 19:14:52 +0000
committerbors <bors@rust-lang.org>2015-06-18 19:14:52 +0000
commit9cc0b2247509d61d6a246a5c5ad67f84b9a2d8b6 (patch)
treec9c5e9d32ccf0c44d331dc9fe139b8d82d912b15 /src/libstd/sys
parentf4518127636e6bffab0599ab4dad785a873c5bd8 (diff)
parentec333380e03eb1fb94c4938db888d5bed40b8fd6 (diff)
Auto merge of #26192 - alexcrichton:features-clean, r=aturon
This commit shards the all-encompassing `core`, `std_misc`, `collections`, and `alloc` features into finer-grained components that are much more easily opted into and tracked. This reflects the effort to push forward current unstable APIs to either stabilization or removal. Keeping track of unstable features on a much more fine-grained basis will enable the library subteam to quickly analyze a feature and help prioritize internally about what APIs should be stabilized.

A few assorted APIs were deprecated along the way, but otherwise this change is just changing the feature name associated with each API. Soon we will have a dashboard for keeping track of all the unstable APIs in the standard library, and I'll also start making issues for each unstable API after performing a first-pass for stabilization.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/poison.rs8
-rw-r--r--src/libstd/sys/common/wtf8.rs51
-rw-r--r--src/libstd/sys/windows/thread_local.rs3
3 files changed, 6 insertions, 56 deletions
diff --git a/src/libstd/sys/common/poison.rs b/src/libstd/sys/common/poison.rs
index 48c81982725..065b1d6c9ac 100644
--- a/src/libstd/sys/common/poison.rs
+++ b/src/libstd/sys/common/poison.rs
@@ -120,24 +120,24 @@ impl<T: Send + Reflect> Error for PoisonError<T> {
 
 impl<T> PoisonError<T> {
     /// Creates a `PoisonError`.
-    #[unstable(feature = "std_misc")]
+    #[stable(feature = "sync_poison", since = "1.2.0")]
     pub fn new(guard: T) -> PoisonError<T> {
         PoisonError { guard: guard }
     }
 
     /// Consumes this error indicating that a lock is poisoned, returning the
     /// underlying guard to allow access regardless.
-    #[unstable(feature = "std_misc")]
+    #[stable(feature = "sync_poison", since = "1.2.0")]
     pub fn into_inner(self) -> T { self.guard }
 
     /// Reaches into this error indicating that a lock is poisoned, returning a
     /// reference to the underlying guard to allow access regardless.
-    #[unstable(feature = "std_misc")]
+    #[stable(feature = "sync_poison", since = "1.2.0")]
     pub fn get_ref(&self) -> &T { &self.guard }
 
     /// Reaches into this error indicating that a lock is poisoned, returning a
     /// mutable reference to the underlying guard to allow access regardless.
-    #[unstable(feature = "std_misc")]
+    #[stable(feature = "sync_poison", since = "1.2.0")]
     pub fn get_mut(&mut self) -> &mut T { &mut self.guard }
 }
 
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index b2dc01e3ccb..8ea673d2162 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -28,7 +28,7 @@
 use core::prelude::*;
 
 use core::char::{encode_utf8_raw, encode_utf16_raw};
-use core::str::{char_range_at_raw, next_code_point};
+use core::str::next_code_point;
 
 use ascii::*;
 use borrow::Cow;
@@ -480,31 +480,6 @@ impl Wtf8 {
         }
     }
 
-    /// Returns the code point at `position`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `position` is not at a code point boundary,
-    /// or is beyond the end of the string.
-    #[inline]
-    pub fn code_point_at(&self, position: usize) -> CodePoint {
-        let (code_point, _) = self.code_point_range_at(position);
-        code_point
-    }
-
-    /// Returns the code point at `position`
-    /// and the position of the next code point.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `position` is not at a code point boundary,
-    /// or is beyond the end of the string.
-    #[inline]
-    pub fn code_point_range_at(&self, position: usize) -> (CodePoint, usize) {
-        let (c, n) = char_range_at_raw(&self.bytes, position);
-        (CodePoint { value: c }, n)
-    }
-
     /// Returns an iterator for the string’s code points.
     #[inline]
     pub fn code_points(&self) -> Wtf8CodePoints {
@@ -1174,30 +1149,6 @@ mod tests {
     }
 
     #[test]
-    fn wtf8_code_point_at() {
-        let mut string = Wtf8Buf::from_str("aé ");
-        string.push(CodePoint::from_u32(0xD83D).unwrap());
-        string.push_char('💩');
-        assert_eq!(string.code_point_at(0), CodePoint::from_char('a'));
-        assert_eq!(string.code_point_at(1), CodePoint::from_char('é'));
-        assert_eq!(string.code_point_at(3), CodePoint::from_char(' '));
-        assert_eq!(string.code_point_at(4), CodePoint::from_u32(0xD83D).unwrap());
-        assert_eq!(string.code_point_at(7), CodePoint::from_char('💩'));
-    }
-
-    #[test]
-    fn wtf8_code_point_range_at() {
-        let mut string = Wtf8Buf::from_str("aé ");
-        string.push(CodePoint::from_u32(0xD83D).unwrap());
-        string.push_char('💩');
-        assert_eq!(string.code_point_range_at(0), (CodePoint::from_char('a'), 1));
-        assert_eq!(string.code_point_range_at(1), (CodePoint::from_char('é'), 3));
-        assert_eq!(string.code_point_range_at(3), (CodePoint::from_char(' '), 4));
-        assert_eq!(string.code_point_range_at(4), (CodePoint::from_u32(0xD83D).unwrap(), 7));
-        assert_eq!(string.code_point_range_at(7), (CodePoint::from_char('💩'), 11));
-    }
-
-    #[test]
     fn wtf8_code_points() {
         fn c(value: u32) -> CodePoint { CodePoint::from_u32(value).unwrap() }
         fn cp(string: &Wtf8Buf) -> Vec<Option<char>> {
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs
index a3d522d1757..5002de55988 100644
--- a/src/libstd/sys/windows/thread_local.rs
+++ b/src/libstd/sys/windows/thread_local.rs
@@ -12,7 +12,6 @@ use prelude::v1::*;
 
 use libc::types::os::arch::extra::{DWORD, LPVOID, BOOL};
 
-use boxed;
 use ptr;
 use rt;
 use sys_common::mutex::Mutex;
@@ -143,7 +142,7 @@ unsafe fn init_dtors() {
         DTOR_LOCK.unlock();
     });
     if res.is_ok() {
-        DTORS = boxed::into_raw(dtors);
+        DTORS = Box::into_raw(dtors);
     } else {
         DTORS = 1 as *mut _;
     }