diff options
| author | Aaron Turon <aturon@mozilla.com> | 2015-03-18 09:14:54 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2015-03-23 15:01:45 -0700 |
| commit | 8389253df0431e58bfe0a8e0e3949d58ebe7400f (patch) | |
| tree | 816e989b62f4c6b9fb6dc8ea199fe3c2538d2a80 /src/libstd/lib.rs | |
| parent | b0aad7dd4fad8d7e2e2f877a511a637258949597 (diff) | |
| download | rust-8389253df0431e58bfe0a8e0e3949d58ebe7400f.tar.gz rust-8389253df0431e58bfe0a8e0e3949d58ebe7400f.zip | |
Add generic conversion traits
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba54..1488c7969f6 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -126,8 +126,10 @@ #![feature(hash)] #![feature(int_uint)] #![feature(unique)] +#![feature(convert)] #![feature(allow_internal_unstable)] #![feature(str_char)] +#![feature(into_cow)] #![cfg_attr(test, feature(test, rustc_private))] // Don't link to std. We are std. @@ -169,6 +171,7 @@ pub use core::any; pub use core::cell; pub use core::clone; #[cfg(not(test))] pub use core::cmp; +pub use core::convert; pub use core::default; #[allow(deprecated)] pub use core::finally; |
