about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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.
2016-01-12Auto merge of #30719 - pyfisch:fix30657, r=alexcrichtonbors-32/+27
2016-01-12Auto merge of #30678 - Amanieu:no_elf_tls, r=alexcrichtonbors-38/+3
I also re-enabled the use of `#[thread_local]` on AArch64. It was originally disabled in the PR that introduced AArch64 (#19790), but the reasons for this were not explained. `#[thread_local]` seems to work fine in my tests on AArch64, so I don't think this should be an issue. cc @alexcrichton @akiss77
2016-01-12openbsd has dirent d_namlen field nowSébastien Marie-3/+3
2016-01-12make siginfo_si_addr() returns a usizeSébastien Marie-5/+5
`siginfo_si_addr()` function is used once, and the returned value is casted to `usize`. So make the function returns a `usize`. it simplifies OpenBSD case, where the return type wouldn't be a `*mut libc::c_void` but a `*mut libc::c_char`.
2016-01-12switch from syscall(2) to getentropy(2)Sébastien Marie-1/+1
use the `getentropy()` function instead of `syscall()` and syscall-numbers.
2016-01-12Add set_oom_handler and use it print a message when out of memoryAmanieu d'Antras-2/+43
2016-01-11Replace no_elf_tls with target_thread_localAmanieu d'Antras-38/+3
2016-01-11Auto merge of #30490 - ipetkov:unix-spawn, r=alexcrichtonbors-0/+32
* If the requested descriptors to inherit are stdio descriptors there are situations where they will not be set correctly * Example: parent's stdout --> child's stderr parent's stderr --> child's stdout * Solution: if the requested descriptors for the child are stdio descriptors, `dup` them before overwriting the child's stdio Example of a program which exhibits the bug: ```rust // stdio.rs use std::io::Write; use std::io::{stdout, stderr}; use std::process::{Command, Stdio}; use std::os::unix::io::FromRawFd; fn main() { stdout().write_all("parent stdout\n".as_bytes()).unwrap(); stderr().write_all("parent stderr\n".as_bytes()).unwrap(); Command::new("sh") .arg("-c") .arg("echo 'child stdout'; echo 'child stderr' 1>&2") .stdin(Stdio::inherit()) .stdout(unsafe { FromRawFd::from_raw_fd(2) }) .stderr(unsafe { FromRawFd::from_raw_fd(1) }) .status() .unwrap_or_else(|e| { panic!("failed to execute process: {}", e) }); } ``` Before: ``` $ rustc --version rustc 1.7.0-nightly (8ad12c3e2 2015-12-19) $ rustc stdio.rs && ./stdio >out 2>err $ cat out parent stdout $ cat err parent stderr child stdout child stderr ``` After (expected): ``` $ rustc --version rustc 1.7.0-dev (712eccee2 2015-12-19) $ rustc stdio.rs && ./stdio >out 2>err $ cat out parent stdout child stderr $ cat err parent stderr child stdout ```
2016-01-10Derive Hash for DurationSteven Fackler-1/+1
2016-01-07fix broken float methodsPyfisch-3/+3
closes #30657
2016-01-07fix trailing whitespacePyfisch-1/+1
2016-01-07f32: inline methods with special variant for msvcPyfisch-32/+27
2016-01-07Move os_str docs to OsString in order to be visible in HTML (fixes #30743)Georg Brandl-23/+17
2016-01-07Auto merge of #30557 - sfackler:panic-propagate, r=aturonbors-1/+28
See rust-lang/rfcs#1413. r? @alexcrichton
2016-01-06Add std::panic::propagateSteven Fackler-1/+28
2016-01-04Auto merge of #29732 - nathansizemore:master, r=steveklabnikbors-40/+193
2016-01-02Grammar fixesJames Mantooth-6/+6
2016-01-02Adjusted heading and created dedicated section in std::io docsNathan-30/+39
2016-01-02Links and punctionaction fixes.Nathan-43/+57