summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-05-02Revert "Implement FromStr for PathBuf"Alex Crichton-27/+0
This reverts commit 05a9acc3b844ff284a3e3d85dde2d9798abfb215.
2018-04-21Add back missing `#![feature(never_type)]`skennytm-0/+2
2018-04-21Revert "Stabilize the TryFrom and TryInto traits"Felix S. Klock II-3/+4
This reverts commit e53a2a72743810e05f58c61c9d8a4c89b712ad2e.
2018-04-21Revert stabilization of `feature(never_type)`.Felix S. Klock II-1/+2
This commit is just covering the feature gate itself and the tests that made direct use of `!` and thus need to opt back into the feature. A follow on commit brings back the other change that motivates the revert: Namely, going back to the old rules for falling back to `()`.
2018-04-19[beta] Tweak some stabilizations in libstdAlex Crichton-2/+2
This commit tweaks a few stable APIs in the `beta` branch before they hit stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were deleted (added in #49381, issue at #49657). The `and_modify` APIs added in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure. Closes #49581 Closes #49657
2018-04-05Fix "since" version for getpid feature.Thayne McCombs-1/+1
It was stabilized right before the beta branch was cut for 1.26.0. See https://github.com/rust-lang/rust/pull/49523#issuecomment-377996315
2018-04-02Auto merge of #49580 - glandium:core-heap, r=SimonSapinbors-2/+4
Use Alloc and Layout from core::heap. 94d1970bba87f2d2893f6e934e4c3f02ed50604d moved the alloc::allocator module to core::heap, moving e.g. Alloc and Layout out of the alloc crate. While alloc::heap reexports them, it's better to use them from where they really come from.
2018-04-02Use Alloc and Layout from core::heap.Mike Hommey-2/+4
94d1970bba87f2d2893f6e934e4c3f02ed50604d moved the alloc::allocator module to core::heap, moving e.g. Alloc and Layout out of the alloc crate. While alloc::heap reexports them, it's better to use them from where they really come from.
2018-04-01Stabilize `std::process::id()`Thayne McCombs-2/+1
Fixes #44971
2018-04-01Auto merge of #49418 - frewsxcv:frewsxcv-network-order, r=TimNNbors-2/+80
Clarify network byte order conversions for integer / IP address conversions. Opened primarily to address https://github.com/rust-lang/rust/issues/48819. Also added a few other conversion docs/examples.
2018-04-01Auto merge of #49522 - mbrubeck:fs_read, r=SimonSapinbors-5/+5
Rename fs::read_string to read_to_string and stabilize As approved in https://github.com/rust-lang/rust/issues/46588#issuecomment-377530365 Closes #46588.
2018-03-31Auto merge of #49521 - mbrubeck:fs_read_write_bytes, r=TimNNbors-2/+2
fs_read_write_bytes stabilized in 1.26.0 Fix the stabilization attributes from #49422 because it merged before 1.26 branched to beta. r? @TimNN
2018-03-31Auto merge of #49501 - sfackler:unix-epoch-assoc-const, r=alexcrichtonbors-0/+23
Make UNIX_EPOCH an associated constant of SystemTime It's not very discoverable as a separate const in the module. r? @alexcrichton
2018-03-31Auto merge of #49481 - SimonSapin:core-heap, r=alexcrichtonbors-1/+2
Move the alloc::allocator module to core::heap This is the `Alloc` trait and its dependencies.
2018-03-30Auto merge of #49324 - SimonSapin:unsigned, r=alexcrichtonbors-0/+1
Deprecate signed std::num::NonZeroI* with a call for use cases CC https://github.com/rust-lang/rust/issues/49137#issuecomment-375823481
2018-03-30Rename fs::read_string to read_to_string and stabilizeMatt Brubeck-5/+5
2018-03-30fs_read_write_bytes stabilized in 1.26.0Matt Brubeck-2/+2
2018-03-30Deprecate signed std::num::NonZeroI* with a call for use casesSimon Sapin-0/+1
2018-03-30Revert "Add TryFrom and TryInto to the prelude"Simon Sapin-2/+0
This reverts commit 09008cc23ff6395c2c928f3690e07d7389d08ebc.
2018-03-30Fix doctestSteven Fackler-0/+1
2018-03-30Make UNIX_EPOCH an associated constant of SystemTimeSteven Fackler-0/+22
It's not very discoverable as a separate const in the module.
2018-03-30Auto merge of #49422 - mbrubeck:fs_read, r=TimNNbors-6/+2
Stabilize fs::read and fs::write As discussed in https://github.com/rust-lang/rust/issues/46588#issuecomment-373956283
2018-03-29Move the alloc::allocator module to core::heapSimon Sapin-1/+2
This is the `Alloc` trait and its dependencies.
2018-03-29Hide the Bound type in docs at its deprecated location in std::collectionsSimon Sapin-0/+1
2018-03-29Hide the deprecated std::collections::range module from docsSimon Sapin-0/+1
2018-03-29Move RangeArguments to {core::std}::ops and rename to RangeBoundsSimon Sapin-2/+6
These unstable items are deprecated: * The `std::collections::range::RangeArgument` reexport * The `std::collections::range` module.
2018-03-29Move alloc::Bound to {core,std}::opsSimon Sapin-1/+2
The stable reexport `std::collections::Bound` is now deprecated. Another deprecated reexport could be added in `alloc`, but that crate is unstable.
2018-03-28Auto merge of #49460 - kennytm:rollup, r=kennytmbors-0/+124
Rollup of 12 pull requests - Successful merges: #49243, #49329, #49364, #49400, #49405, #49427, #49428, #49429, #49439, #49442, #49444, #49452 - Failed merges:
2018-03-28Auto merge of #49357 - frewsxcv:frewsxcv-termination-doc-examples, ↵bors-1127/+1130
r=GuillaumeGomez Remove hidden `foo` functions from doc examples; use `Termination` trait. Fixes https://github.com/rust-lang/rust/issues/49233. Easier to review with the white-space ignoring `?w=1` feature: https://github.com/rust-lang/rust/pull/49357/files?w=1
2018-03-28Rollup merge of #49400 - Diggsey:shrink-to, r=joshtriplettkennytm-0/+124
Implement `shrink_to` method on collections Fixes #49385
2018-03-28Stabilize fs::read and fs::writeMatt Brubeck-6/+2
2018-03-28Clarify network byte order conversions for integer / IP address conversions.Corey Farwell-2/+80
Opened primarily to address https://github.com/rust-lang/rust/issues/48819.
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-1127/+1130
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-27Remove TryFrom impls that might become conditionally-infallible with a ↵Simon Sapin-2/+18
portability lint https://github.com/rust-lang/rust/pull/49305#issuecomment-376293243
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+124
2018-03-26Add TryFrom and TryInto to the preludeSimon Sapin-0/+2
2018-03-26Stabilize the TryFrom and TryInto traitsSimon Sapin-4/+3
Tracking issue: https://github.com/rust-lang/rust/issues/33417
2018-03-26Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisabors-14/+8
Stabilize 128-bit integers :tada: cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
2018-03-26fix last two tidyMark Mansi-6/+1
2018-03-26Fix a few moreMark Mansi-2/+2
2018-03-26Fix missed i128 feature gatesMark Mansi-2/+2
2018-03-26Stabilize i128 feature tooMark Mansi-4/+3
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-26Rollup merge of #49346 - Diggsey:hashmap-get-pair, r=Mark-SimulacrumTim Neumann-0/+28
Implement get_key_value for HashMap, BTreeMap Fixes #43143 Follow up from #46992
2018-03-26Rollup merge of #48932 - Phlosioneer:43601-document-opaque-size, r=KodrAusTim Neumann-0/+24
Document when types have OS-dependent sizes As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: ``` The size of a(n) <name> struct may vary depending on the target operating system, and may change between Rust releases. ``` For enums, I used "instance" instead of "struct". I added documentation to these types: ``` - std::time::Instant (contains sys::time::Instant) - std::time::SystemTime (contains sys::time::SystemTime) - std::io::StdinRaw (contains sys::stdio::Stdin) - std::io::StdoutRaw (contains sys::stdio::Stdout) - std::io::Stderr (contains sys::stdio::Stderr) - std::net::addr::SocketAddrV4 (contains sys::net::netc::sockaddr_in) - std::net::addr::SocketAddrV6 (contains sys::net::netc::sockaddr_in6) - std::net::addr::SocketAddr (contains std::net::addr::SocketAddrV4 and SocketAddrV6) - std::net::ip::Ipv4Addr (contains sys::net::netc::in_addr) - std::net::ip::Ipv6Addr (contains sys::net::netc::in6_addr) - std::net::ip::IpAddr (contains std::net::ip::Ipv4Addr and Ipv6Addr) ``` I also found that these types varied in size; however, I don't think they need documentation, as it's already fairly obvious that they change based on different OS's: ``` - std::fs::DirBuilder (contains sys::fs::DirBuilder) - std::fs::FileType (contains sys::fs::FileType) - std::fs::Permissions (contains sys::fs::FilePermissions) - std::fs::OpenOptions (contains sys::fs::OpenOptions) - std::fs::DirEntry (contains sys::fs::DirEntry) - std::fs::ReadDir (contains sys::fs::ReadDir) - std::fs::Metadata (contains sys::fs::FileAttr) - std::fs::File (contains sys::fs::File) - std::process::Child (contains sys::process::Process) - std::process::ChildStdin (contains sys::process::AnonPipe) - std::process::ChildStdout (contains sys::process::AnonPipe) - std::process::ChildStderr (contains sys::process::AnonPipe) - std::process::Command (contains sys::process::Command) - std::process::Stdio (contains sys::process::Stdio) - std::process::ExitStatus (contains sys::process::ExitStatus) - std::process::Output (contains std::process::ExitStatus) - std::sys_common::condvar::Condvar (contains sys::condvar::Condvar) - std::sys_common::mutex::Mutex (contains sys::mutex::Mutex) - std::sys_common::net::LookupHost (contains sys::net::netc::addrinfo) - std::sys_common::net::TcpStream (contains sys::net::Socket) - std::sys_common::net::TcpListener (contains sys::net::Socket) - std::sys_common::net::UdpSocket (contains sys::net::Socket) - std::sys_common::remutex::ReentrantMutex (contains sys::mutex::ReentrantMutex) - std::sys_common::rwlock::RWLock (contains sys::rwlock::RWLock) - std::sys_common::thread_local::Key (contains sys::thread_local::Key) ``` Maybe we should just put a comment about the size of structs in the module-level docs for `fs`, `process`, and `sys_common`? If anyone can think of other types that can change size, comment below. I'm also open to changing the wording. closes #43601.
2018-03-26Auto merge of #49351 - pthariensflame:patch-1, r=oli-obkbors-1/+1
Minor message/label formatting consistency fix. The unimplemented label for `Termination` was missing some backticks for consistency with the message.
2018-03-25Implement get_key_value for HashMap, BTreeMapDiggory Blake-0/+28
2018-03-25Minor formatting consistency fix.Alexander Ronald Altman-1/+1
2018-03-25Auto merge of #49315 - TheDan64:smaller_unsafe_block, r=joshtriplettbors-7/+5
Reduce scope of unsafe block in sun_path_offset I reduced the scope of the unsafe block to the `uninitialized` call which is the only actual unsafe bit.
2018-03-24Add backticksPhlosioneer-7/+7