]> git.lizzy.rs Git - rust.git/commit
Stabilize `std::convert` and related code
authorAaron Turon <aturon@mozilla.com>
Mon, 30 Mar 2015 22:15:27 +0000 (15:15 -0700)
committerAaron Turon <aturon@mozilla.com>
Tue, 31 Mar 2015 18:24:38 +0000 (11:24 -0700)
commit9fc51efe3344a32d9e522f08383f052277b6ab63
tree29eb89ae9f4b70cc88642eb6b66cbb9398c41ae4
parent6cf3b0b74aadcc1fe87adbd2c74876a1f6c920b3
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]
25 files changed:
src/compiletest/compiletest.rs
src/libcollections/lib.rs
src/libcollections/string.rs
src/libcollections/vec.rs
src/libcore/convert.rs
src/librustc/lib.rs
src/librustc_back/lib.rs
src/librustc_driver/lib.rs
src/librustc_trans/lib.rs
src/librustdoc/lib.rs
src/libserialize/lib.rs
src/libstd/dynamic_lib.rs
src/libstd/env.rs
src/libstd/ffi/os_str.rs
src/libstd/lib.rs
src/libstd/path.rs
src/libstd/sys/unix/ext.rs
src/libstd/sys/unix/fs2.rs
src/libstd/sys/unix/process2.rs
src/libsyntax/lib.rs
src/libterm/lib.rs
src/libtest/lib.rs
src/rustbook/main.rs
src/test/run-pass/env-home-dir.rs
src/test/run-pass/issue-20797.rs