summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2016-01-23Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichtonSteve Klabnik-3/+1
Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()` to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that. (First PR, be nice :)
2016-01-23Semaphore not sempahoreangelsl-1/+1
2016-01-23Impl Error for Box<T: Error>Guillaume Gomez-0/+11
2016-01-22Simplify return for error::Error impl for string::ParseErrorDirk Gadsden-1/+1
2016-01-22Implement error::Error and fmt::Display for string::ParseErrorDirk Gadsden-0/+7
Fixes #31106.
2016-01-22Auto merge of #31070 - sfackler:bufreader-box-slice, r=alexcrichtonbors-2/+2
Saves a word, and also prevents the impl from accidentally changing the buffer length. r? @alexcrichton
2016-01-22Auto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichtonbors-3/+40
We don't want to write the same data twice. Closes #30888 r? @alexcrichton
2016-01-21doc: this sentence did not read wellTshepang Lekhonkhobe-2/+2
2016-01-21doc: improve grammarTshepang Lekhonkhobe-1/+1
2016-01-21Auto merge of #31057 - bluss:memrchr-fallback, r=alexcrichtonbors-1/+1
Use the fallback impl for memrchr on non-linux The memrchr code was never used(!). This brings the memrchr improvements to non-linux platforms (LineWriter / buffered stdout benefits). Previous PR #30381
2016-01-20Use a Box<[u8]> in BufReaderSteven Fackler-2/+2
Saves a word, and also prevents the impl from accidentally changing the buffer length.
2016-01-20Don't flush in BufWriter destructor after a panic in writeSteven Fackler-3/+40
We don't want to write the same data twice. Closes #30888
2016-01-20Auto merge of #30872 - pitdicker:expand_open_options, r=alexcrichtonbors-177/+480
Tracking issue: #30014 This implements the RFC and makes a few other changes. I have added a few extra tests, and made the Windows and Unix code as similar as possible. Part of the RFC mentions the unstable OpenOptionsExt trait on Windows (see #27720). I have added a few extra methods to future-proof it for CreateFile2.
2016-01-20std: Use the fallback impl for memrchr on non-linuxUlrik Sverdrup-1/+1
This code was never used(!). This brings the memrchr improvements to non-linux platforms (LineWriter / buffered stdout benefits).
2016-01-20Remove raw pointer from OpenOptions structPaul Dicker-3/+9
Otherwise it is not Send and Sync anymore
2016-01-20Auto merge of #30894 - antrik:debug-mpsc, r=brsonbors-0/+69
Minimal fix for https://github.com/rust-lang/rust/issues/30563 This covers all the public structs I think; except for Iter and IntoIter, which I don't know if or how they should be handled.
2016-01-20Remove leftover import of `std::str` in doc testAndrea Bedini-1/+0
2016-01-19Add examples of the Entry API to the HashMap documentation.Nathan Kleyn-0/+29
Responding to [a thread of discussion on the Rust subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/), it was identified that the presence of the Entry API is not duly publicised. This commit aims to add some reasonable examples of common usages of this API to the main example secion of the `HashMap` documentation. This is part of issue #29348.
2016-01-19Improve CStr::from_ptr example in docsAndrea Bedini-2/+1
Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()` to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.
2016-01-19Use different numbers of `#`s when expanding documentation commentsBarosl Lee-0/+3
Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s. This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately. Fixes #27489.
2016-01-18Auto merge of #30973 - SimonSapin:patch-16, r=alexcrichtonbors-4/+4
I don’t understand what the "flow information" of an IPv6 address is, but it looks separate from the scope ID. This was probably a copy/paste error.
2016-01-17Rollup merge of #30957 - GuillaumeGomez:patch-3, r=apasel422Manish Goregaokar-1/+1
r? @Manishearth
2016-01-17Fix SocketAddrV6::flowinfo docsSimon Sapin-4/+4
I don’t understand what the "flow information" of an IPv6 address is, but it looks separate from the scope ID. This was probably a copy/paste error.
2016-01-16std: Stabilize APIs for the 1.7 releaseAlex Crichton-38/+137
This commit stabilizes and deprecates the FCP (final comment period) APIs for the upcoming 1.7 beta release. The specific APIs which changed were: Stabilized * `Path::strip_prefix` (renamed from `relative_from`) * `path::StripPrefixError` (new error type returned from `strip_prefix`) * `Ipv4Addr::is_loopback` * `Ipv4Addr::is_private` * `Ipv4Addr::is_link_local` * `Ipv4Addr::is_multicast` * `Ipv4Addr::is_broadcast` * `Ipv4Addr::is_documentation` * `Ipv6Addr::is_unspecified` * `Ipv6Addr::is_loopback` * `Ipv6Addr::is_unique_local` * `Ipv6Addr::is_multicast` * `Vec::as_slice` * `Vec::as_mut_slice` * `String::as_str` * `String::as_mut_str` * `<[T]>::clone_from_slice` - the `usize` return value is removed * `<[T]>::sort_by_key` * `i32::checked_rem` (and other signed types) * `i32::checked_neg` (and other signed types) * `i32::checked_shl` (and other signed types) * `i32::checked_shr` (and other signed types) * `i32::saturating_mul` (and other signed types) * `i32::overflowing_add` (and other signed types) * `i32::overflowing_sub` (and other signed types) * `i32::overflowing_mul` (and other signed types) * `i32::overflowing_div` (and other signed types) * `i32::overflowing_rem` (and other signed types) * `i32::overflowing_neg` (and other signed types) * `i32::overflowing_shl` (and other signed types) * `i32::overflowing_shr` (and other signed types) * `u32::checked_rem` (and other unsigned types) * `u32::checked_neg` (and other unsigned types) * `u32::checked_shl` (and other unsigned types) * `u32::saturating_mul` (and other unsigned types) * `u32::overflowing_add` (and other unsigned types) * `u32::overflowing_sub` (and other unsigned types) * `u32::overflowing_mul` (and other unsigned types) * `u32::overflowing_div` (and other unsigned types) * `u32::overflowing_rem` (and other unsigned types) * `u32::overflowing_neg` (and other unsigned types) * `u32::overflowing_shl` (and other unsigned types) * `u32::overflowing_shr` (and other unsigned types) * `ffi::IntoStringError` * `CString::into_string` * `CString::into_bytes` * `CString::into_bytes_with_nul` * `From<CString> for Vec<u8>` * `From<CString> for Vec<u8>` * `IntoStringError::into_cstring` * `IntoStringError::utf8_error` * `Error for IntoStringError` Deprecated * `Path::relative_from` - renamed to `strip_prefix` * `Path::prefix` - use `components().next()` instead * `os::unix::fs` constants - moved to the `libc` crate * `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize * `IntoCow` - conflicts with `Into` and may come back later * `i32::{BITS, BYTES}` (and other integers) - not pulling their weight * `DebugTuple::formatter` - will be removed * `sync::Semaphore` - not used enough and confused with system semaphores Closes #23284 cc #27709 (still lots more methods though) Closes #27712 Closes #27722 Closes #27728 Closes #27735 Closes #27729 Closes #27755 Closes #27782 Closes #27798
2016-01-16Fix typoGuillaume Gomez-1/+1
2016-01-15Addressed commentsPaul Dicker-60/+75
2016-01-15Auto merge of #30898 - petrochenkov:tvarfstab, r=alexcrichtonbors-19/+31
This wasn't done in https://github.com/rust-lang/rust/pull/29083 because attributes weren't parsed on fields of tuple variant back then. r? @alexcrichton
2016-01-15Rollup merge of #30925 - semarie:blksize_t, r=alexcrichtonManish Goregaokar-1/+1
make `os::raw::tests::unix` test to pass again r? @alexcrichton
2016-01-15Rollup merge of #30776 - antonblanchard:powerpc64_merge, r=alexcrichtonManish Goregaokar-9/+40
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-15Rollup merge of #30591 - SimonSapin:patch-15, r=aturonManish Goregaokar-2/+3
The first line (paragraph?) of a doc-comment is what rustdoc shows when listing items of a module. What makes `Instant` and `SystemTime` different is important enough to be there. (Though feel free to bikeshed the wording.)
2016-01-14update blksize_t in raw to reflect libc change under openbsdSébastien Marie-1/+1
2016-01-14Fix doctestsPaul Dicker-3/+6
2016-01-14Fix outdated commenttomaka-1/+1
2016-01-14Require stability annotations on fields of tuple variantsVadim Petrochenkov-19/+31
2016-01-14Rollup merge of #30886 - ollie27:docs_links, r=steveklabnikManish Goregaokar-13/+13
r? @steveklabnik
2016-01-14std::sync::mpsc: Add fmt::Debug stubsOlaf Buddenhagen-0/+69
Minimal fix for https://github.com/rust-lang/rust/issues/30563 This covers all the public structs I think; except for Iter and IntoIter, which I don't know if or how they should be handled.
2016-01-14Rollup merge of #30850 - ranma42:cleanup-io, r=alexcrichtonManish Goregaokar-15/+0
In 8d90d3f36871a00023cc1f313f91e351c287ca15 `BufStream`, the only consumer of `InternalBufWriter`, was removed. As implied by the name, this type is private, hence it is currently dead code.
2016-01-14Rollup merge of #30837 - semarie:openbsd-libc, r=alexcrichtonManish Goregaokar-9/+9
The following PR updates libc version to latest commits for correctly support openbsd. It corrects several points in rustc to be compatible with libc changes. r? @alexcrichton
2016-01-14Rollup merge of #30818 - sfackler:duration-hash, r=alexcrichtonManish Goregaokar-1/+1
tikue pointed out in IRC that this was missing.
2016-01-14Rollup merge of #30801 - Amanieu:oom_print, r=alexcrichtonManish Goregaokar-6/+47
This adds the ability to override the default OOM behavior by setting a handler function. This is used by libstd to print a message when running out of memory instead of crashing with an obscure "illegal hardware instruction" error (at least on Linux). Fixes #14674
2016-01-13Fix some broken and missing links in the docsOliver Middleton-13/+13
2016-01-13Move `custom_flags` to `OpenOptionsExt`Paul Dicker-39/+58
And mark the new methods as unstable.
2016-01-13Add missing newline character to callers of dumb_printAmanieu d'Antras-5/+5
2016-01-13Auto merge of #30509 - michaelsproul:string-box-error, r=alexcrichtonbors-0/+16
Closes #30156.
2016-01-13Implement RFC 1252 expanding the OpenOptions structurePaul Dicker-177/+437
Tracking issue: #30014 This implements the RFC and makes a few other changes. I have added a few extra tests, and made the Windows and Unix code as similar as possible. Part of the RFC mentions the unstable OpenOptionsExt trait on Windows (see #27720). I have added a few extra methods to future-proof it for CreateFile2.
2016-01-13Incorrect getrandom() system call for PowerPC LinuxAnton Blanchard-2/+4
Michael Ellerman pointed out that the system call for getrandom() on PowerPC Linux is incorrect. This bug was in the powerpc32 port, and was carried over to the powerpc64 port too.
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-9/+38
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-13Add an impl for Box<Error> from &str.Michael Sproul-0/+7
2016-01-12Remove dead `InternalBufWriter` implementationAndrea Canciani-15/+0
In 8d90d3f36871a00023cc1f313f91e351c287ca15 `BufStream`, the only consumer of `InternalBufWriter`, was removed. As implied by the name, this type is private, hence it is currently dead code.
2016-01-12Update wording of Instant and SystemTime docsSimon Sapin-4/+4
… per aturon’s proposal.