about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2018-03-23Rollup merge of #48265 - SimonSapin:nonzero, r=KodrAusAlex Crichton-0/+12
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero RFC: https://github.com/rust-lang/rfcs/pull/2307 Tracking issue: ~~https://github.com/rust-lang/rust/issues/27730~~ https://github.com/rust-lang/rust/issues/49137 Fixes https://github.com/rust-lang/rust/issues/27730
2018-03-22Command::env_saw_path() may be unused on platforms not using posix_spawn()Bryan Drewery-0/+1
2018-03-22Rollup merge of #49038 - canndrew:replace-infallible-with-never, r=SimonSapinkennytm-9/+0
replace `convert::Infallible` with `!`
2018-03-22Rollup merge of #49117 - nivkner:fixme_fixup3, r=estebankkennytm-1/+0
address some FIXME whose associated issues were marked as closed part of #44366
2018-03-22Rollup merge of #49109 - SimonSapin:deprecate-asciiext, r=alexcrichtonkennytm-11/+24
Deprecate the AsciiExt trait in favor of inherent methods The trait and some of its methods are stable and will remain. Some of the newer methods are unstable and can be removed later. Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-21termination_trait: Make error message more helpfulTyler Mandry-2/+3
2018-03-21Fixed clockwise/counter-clockwise in atan2 documentation in f32 and f64Maxwell Borden-8/+10
and included that it returns radians
2018-03-21termination_trait: Put examples in error help, not labelTyler Mandry-1/+1
2018-03-21Deprecate the AsciiExt trait in favor of inherent methodsSimon Sapin-11/+24
The trait and some of its methods are stable and will remain. Some of the newer methods are unstable and can be removed later. Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-21document format_args! further wrt. Debug & Display"Mazdak Farrokhzad-0/+12
2018-03-21termination_trait: Add () example to error messageTyler Mandry-1/+1
2018-03-20Refactor the stack addr aligning code into a functionTatsuyuki Ishi-16/+16
2018-03-20Remove StdioRaw doc additions, add backticksPhlosioneer-10/+1
2018-03-19Simplify PATH key comparisonBryan Drewery-1/+1
2018-03-20Rollup merge of #49139 - sfackler:bufreader-buffer, r=SimonSapinkennytm-1/+29
Add BufReader::buffer This subsumes the need for an explicit is_empty function, and provides access to the buffered data itself which has been requested from time to time. We could call this `buf` to match `fill_buf`, but I think I'd prefer `fill_buffer` anyways in hindsight.
2018-03-19Don't use posix_spawn() if PATH was modified in the environment.Bryan Drewery-0/+16
The expected behavior is that the environment's PATH should be used to find the process. posix_spawn() could be used if we iterated PATH to search for the binary to execute. For now just skip posix_spawn() if PATH is modified.
2018-03-19Merge branch 'update-beta-freebsd' into freebsd-posix-spawnBryan Drewery-840/+1185
2018-03-19Auto merge of #49108 - SimonSapin:sip, r=TimNNbors-2/+1
Remove or hide deprecated unstable SipHasher{13,24} Deprecated since Rust 1.13.0.
2018-03-19Stabilize termination_traitTyler Mandry-1/+1
This stabilizes `main` with non-() return types; see #48453.
2018-03-19Address review commentsTatsuyuki Ishi-9/+34