about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-03-07 15:42:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-03-12 12:31:13 -0800
commitb53764c73bd722ea22142bace6249d5950066253 (patch)
treeecf0066dbdb65bf0cf4600c4560d06edcacff707 /src/libstd/ffi
parent083db64d9050ae6f92628aa869171ac4affb016f (diff)
downloadrust-b53764c73bd722ea22142bace6249d5950066253.tar.gz
rust-b53764c73bd722ea22142bace6249d5950066253.zip
std: Clean out deprecated APIs
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/os_str.rs52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index d979aa264af..46f2d3a6418 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use borrow::{Borrow, Cow, ToOwned};
-use ffi::CString;
 use fmt::{self, Debug};
 use mem;
 use string::String;
@@ -56,22 +55,6 @@ impl OsString {
         OsString { inner: Buf::from_string(String::new()) }
     }
 
-    /// Constructs an `OsString` from a byte sequence.
-    ///
-    /// # Platform behavior
-    ///
-    /// On Unix systems, any byte sequence can be successfully
-    /// converted into an `OsString`.
-    ///
-    /// On Windows system, only UTF-8 byte sequences will successfully
-    /// convert; non UTF-8 data will produce `None`.
-    #[unstable(feature = "convert", reason = "recently added", issue = "27704")]
-    #[rustc_deprecated(reason = "RFC was closed, hides subtle Windows semantics",
-                       since = "1.6.0")]
-    pub fn from_bytes<B>(bytes: B) -> Option<OsString> where B: Into<Vec<u8>> {
-        Self::_from_bytes(bytes.into())
-    }
-
     #[cfg(unix)]
     fn _from_bytes(vec: Vec<u8>) -> Option<OsString> {
         use os::unix::ffi::OsStringExt;
@@ -294,41 +277,6 @@ impl OsStr {
         OsString { inner: self.inner.to_owned() }
     }
 
-    /// Yields this `OsStr` as a byte slice.
-    ///
-    /// # Platform behavior
-    ///
-    /// On Unix systems, this is a no-op.
-    ///
-    /// On Windows systems, this returns `None` unless the `OsStr` is
-    /// valid Unicode, in which case it produces UTF-8-encoded
-    /// data. This may entail checking validity.
-    #[unstable(feature = "convert", reason = "recently added", issue = "27704")]
-    #[rustc_deprecated(reason = "RFC was closed, hides subtle Windows semantics",
-                       since = "1.6.0")]
-    pub fn to_bytes(&self) -> Option<&[u8]> {
-        if cfg!(windows) {
-            self.to_str().map(|s| s.as_bytes())
-        } else {
-            Some(self.bytes())
-        }
-    }
-
-    /// Creates a `CString` containing this `OsStr` data.
-    ///
-    /// Fails if the `OsStr` contains interior nulls.
-    ///
-    /// This is a convenience for creating a `CString` from
-    /// `self.to_bytes()`, and inherits the platform behavior of the
-    /// `to_bytes` method.
-    #[unstable(feature = "convert", reason = "recently added", issue = "27704")]
-    #[rustc_deprecated(reason = "RFC was closed, hides subtle Windows semantics",
-                       since = "1.6.0")]
-    #[allow(deprecated)]
-    pub fn to_cstring(&self) -> Option<CString> {
-        self.to_bytes().and_then(|b| CString::new(b).ok())
-    }
-
     /// Checks whether the `OsStr` is empty.
     #[unstable(feature = "osstring_simple_functions",
                reason = "recently added", issue = "29453")]