Stabilize std::convert and related code

* Marks `#[stable]` the contents of the `std::convert` module.

* Added methods `PathBuf::as_path`, `OsString::as_os_str`,
  `String::as_str`, `Vec::{as_slice, as_mut_slice}`.

* Deprecates `OsStr::from_str` in favor of a new, stable, and more
  general `OsStr::new`.

* Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
  to_cstring}` for ergonomic FFI usage.

[breaking-change]
This commit is contained in:
Aaron Turon 2015-03-30 15:15:27 -07:00
parent 6cf3b0b74a
commit 9fc51efe33
25 changed files with 132 additions and 70 deletions

View file

@ -11,7 +11,6 @@
// pretty-expanded FIXME #23616
#![feature(path)]
#![feature(convert)]
use std::env::*;
use std::path::PathBuf;

View file

@ -12,8 +12,6 @@
// pretty-expanded FIXME #23616
#![feature(convert)]
use std::default::Default;
use std::io;
use std::fs;