about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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-29fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+6
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-28fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+4
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-28std: Child::kill() returns error if process has already exitedAndreas Tolfsen-2/+3
This patch makes it clear in std::process::Child::kill()'s API documentation that an error is returned if the child process has already cleanly exited. This is implied by the example, but not called out explicitly.
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-28Use mprotect instead of mmapTatsuyuki Ishi-3/+2
2018-03-28Address nits and tidy errors.Fabian Zaiser-4/+4
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-26Implement RFC #2169 (Euclidean division).Fabian Zaiser-0/+101
Tracking issue: #49048
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-25Use a more conservative way to deinit stack guardTatsuyuki Ishi-5/+15
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
2018-03-25Rollup merge of #49254 - Tacklebox:atan2_doc, r=QuietMisdreavuskennytm-8/+10
Fixed clockwise/counter-clockwise in atan2 documentation in f32 and f64 and included that it returns radians None
2018-03-25Rollup merge of #49229 - Centril:doc/format_args_display_debug, r=steveklabnikkennytm-0/+12
Document format_args! / Arguments<'a> behavior wrt. Display and Debug This is a follow up PR to #49067 , this documents the behavior of `format_args!` (i.e: `Argument<'a>`) wrt. `Display` and `Debug`. r? @steveklabnik
2018-03-25Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakiskennytm-3/+4
Stabilize termination_trait, split out termination_trait_test For #48453. First time contribution, so I'd really appreciate any feedback on how this PR can be better. Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-25Rollup merge of #49076 - bobdavelisafrank:filetype-metadata-docfix, r=blusskennytm-3/+32
Fix Issue #48345, is_file, is_dir, and is_symlink note mutual exclusion The methods on the structures `fs::FileType` and `fs::Metadata` of (respectively) `is_file`, `is_dir`, and `is_symlink` had some ambiguity in documentation, where it was not noted whether files will pass those tests exclusively or not. It is now written that the tests are mutually exclusive. Fixes #48345.
2018-03-24Fix build on non-Unix platformsTatsuyuki Ishi-0/+5
2018-03-23Reduce scope of unsafe block in sun_path_offsetDaniel Kolsoi-7/+5
2018-03-23Rollup merge of #48624 - bdrewery:freebsd-posix-spawn, r=alexcrichtonAlex Crichton-28/+171
Command: Support posix_spawn() on FreeBSD/OSX/GNU Linux