From c3e8c178abe08c3427046490242ddb9eb3704b03 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 21 Jun 2016 10:14:16 -0700 Subject: [PATCH] std: Fix up stabilization discrepancies * Remove the deprecated `CharRange` type which was forgotten to be removed awhile back. * Stabilize the `os::$platform::raw::pthread_t` type which was intended to be stabilized as part of #32804 --- src/libcollections/lib.rs | 1 - src/libcollections/str.rs | 2 +- src/libcore/str/mod.rs | 16 ---------------- src/libstd/os/android/raw.rs | 3 ++- src/libstd/os/bitrig/raw.rs | 3 ++- src/libstd/os/dragonfly/raw.rs | 3 ++- src/libstd/os/emscripten/raw.rs | 3 ++- src/libstd/os/freebsd/raw.rs | 3 ++- src/libstd/os/ios/raw.rs | 3 ++- src/libstd/os/linux/raw.rs | 3 ++- src/libstd/os/macos/raw.rs | 3 ++- src/libstd/os/nacl/raw.rs | 3 ++- src/libstd/os/netbsd/raw.rs | 3 ++- src/libstd/os/openbsd/raw.rs | 3 ++- src/libstd/os/solaris/raw.rs | 3 ++- src/libstd/sys/unix/ext/raw.rs | 2 +- 16 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index b824817d53f14..7ac01103d61fe 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -49,7 +49,6 @@ #![feature(specialization)] #![feature(staged_api)] #![feature(step_by)] -#![feature(str_char)] #![feature(unboxed_closures)] #![feature(unicode)] #![feature(unique)] diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 3364d7e16972c..55308a46f0ac5 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -37,7 +37,7 @@ use boxed::Box; pub use core::str::{FromStr, Utf8Error}; #[allow(deprecated)] #[stable(feature = "rust1", since = "1.0.0")] -pub use core::str::{Lines, LinesAny, CharRange}; +pub use core::str::{Lines, LinesAny}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::str::{Split, RSplit}; #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 5fc15fae5199b..56d1a396165c7 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1292,22 +1292,6 @@ static UTF8_CHAR_WIDTH: [u8; 256] = [ 4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, // 0xFF ]; -/// Struct that contains a `char` and the index of the first byte of -/// the next `char` in a string. This can be used as a data structure -/// for iterating over the UTF-8 bytes of a string. -#[derive(Copy, Clone, Debug)] -#[unstable(feature = "str_char", - reason = "existence of this struct is uncertain as it is frequently \ - able to be replaced with char.len_utf8() and/or \ - char/char_indices iterators", - issue = "27754")] -pub struct CharRange { - /// Current `char` - pub ch: char, - /// Index of the first byte of the next `char` - pub next: usize, -} - /// Mask of the value bits of a continuation byte const CONT_MASK: u8 = 0b0011_1111; /// Value of the tag bits (tag mask is !CONT_MASK) of a continuation byte diff --git a/src/libstd/os/android/raw.rs b/src/libstd/os/android/raw.rs index ce6e810592c6c..5e473a933a676 100644 --- a/src/libstd/os/android/raw.rs +++ b/src/libstd/os/android/raw.rs @@ -20,7 +20,8 @@ use os::raw::c_long; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_long; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = c_long; #[doc(inline)] #[stable(feature = "raw_ext", since = "1.1.0")] diff --git a/src/libstd/os/bitrig/raw.rs b/src/libstd/os/bitrig/raw.rs index 3fc3c5937f4da..28958575eb229 100644 --- a/src/libstd/os/bitrig/raw.rs +++ b/src/libstd/os/bitrig/raw.rs @@ -31,7 +31,8 @@ use os::unix::raw::{uid_t, gid_t}; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/dragonfly/raw.rs b/src/libstd/os/dragonfly/raw.rs index 83e0be0d158ec..5da2540ceee67 100644 --- a/src/libstd/os/dragonfly/raw.rs +++ b/src/libstd/os/dragonfly/raw.rs @@ -30,7 +30,8 @@ use os::raw::c_long; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/emscripten/raw.rs b/src/libstd/os/emscripten/raw.rs index 9da400a69131b..bcd85f8e29af9 100644 --- a/src/libstd/os/emscripten/raw.rs +++ b/src/libstd/os/emscripten/raw.rs @@ -25,7 +25,8 @@ use os::raw::{c_long, c_short, c_uint, c_ulong}; #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_ulong; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = c_ulong; #[doc(inline)] #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64; diff --git a/src/libstd/os/freebsd/raw.rs b/src/libstd/os/freebsd/raw.rs index 989eef63d82cf..c755e5af8d949 100644 --- a/src/libstd/os/freebsd/raw.rs +++ b/src/libstd/os/freebsd/raw.rs @@ -30,7 +30,8 @@ use os::raw::c_long; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/ios/raw.rs b/src/libstd/os/ios/raw.rs index 5a2de14b28b0c..8b34a932a170a 100644 --- a/src/libstd/os/ios/raw.rs +++ b/src/libstd/os/ios/raw.rs @@ -29,7 +29,8 @@ use os::raw::c_long; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs index 4113966841b24..1be76961fea9e 100644 --- a/src/libstd/os/linux/raw.rs +++ b/src/libstd/os/linux/raw.rs @@ -23,7 +23,8 @@ use os::raw::c_ulong; #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_ulong; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = c_ulong; #[doc(inline)] #[stable(feature = "raw_ext", since = "1.1.0")] diff --git a/src/libstd/os/macos/raw.rs b/src/libstd/os/macos/raw.rs index 2148670ccbd2a..8f9b29462c4f9 100644 --- a/src/libstd/os/macos/raw.rs +++ b/src/libstd/os/macos/raw.rs @@ -29,7 +29,8 @@ use os::raw::c_long; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/nacl/raw.rs b/src/libstd/os/nacl/raw.rs index 9a10fbcc30b72..3c3d4410a2a16 100644 --- a/src/libstd/os/nacl/raw.rs +++ b/src/libstd/os/nacl/raw.rs @@ -30,7 +30,8 @@ #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Copy, Clone)] diff --git a/src/libstd/os/netbsd/raw.rs b/src/libstd/os/netbsd/raw.rs index bc30c1a7f48eb..9b2e037e59a0b 100644 --- a/src/libstd/os/netbsd/raw.rs +++ b/src/libstd/os/netbsd/raw.rs @@ -31,7 +31,8 @@ use os::unix::raw::{uid_t, gid_t}; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/openbsd/raw.rs b/src/libstd/os/openbsd/raw.rs index 0e9a2128bc2a3..6142f03621813 100644 --- a/src/libstd/os/openbsd/raw.rs +++ b/src/libstd/os/openbsd/raw.rs @@ -30,7 +30,8 @@ use os::raw::c_long; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/os/solaris/raw.rs b/src/libstd/os/solaris/raw.rs index 6a75b36bd6bde..b84fdba9ca25c 100644 --- a/src/libstd/os/solaris/raw.rs +++ b/src/libstd/os/solaris/raw.rs @@ -31,7 +31,8 @@ use os::unix::raw::{uid_t, gid_t}; #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; -#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; +#[stable(feature = "pthread_t", since = "1.8.0")] +pub type pthread_t = usize; #[repr(C)] #[derive(Clone)] diff --git a/src/libstd/sys/unix/ext/raw.rs b/src/libstd/sys/unix/ext/raw.rs index 96535e8860418..7972990e67dfe 100644 --- a/src/libstd/sys/unix/ext/raw.rs +++ b/src/libstd/sys/unix/ext/raw.rs @@ -23,7 +23,7 @@ #[stable(feature = "raw_ext", since = "1.1.0")] pub type pid_t = i32; #[doc(inline)] -#[unstable(feature = "pthread_t", issue = "29791")] +#[stable(feature = "pthread_t", since = "1.8.0")] pub use sys::platform::raw::pthread_t; #[doc(inline)] #[stable(feature = "raw_ext", since = "1.1.0")]