summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2016-01-02Added platform notes to std::fs public functions.Nathan-35/+165
2016-01-01Auto merge of #30672 - nagisa:to-degrad-stab, r=sfacklerbors-8/+2
f64 methods have been stable since rust 1.0, but f32 never got stabilised. I suggest backporting this to beta as well (needs changing stablilisation version then). r? @aturon Fixes https://github.com/rust-lang/rfcs/issues/1438
2016-01-02Stabilise f32::to_{degrees,radians} to match f64Simonas Kazlauskas-8/+2
f64 methods have been stable since rust 1.0, but f32 never got stabilised.
2016-01-01Auto merge of #30670 - emoon:fs-copy-comment, r=steveklabnikbors-3/+3
When looking in the documentation I often scan the examples the first thing I do. In these 3 cases it's not obvious which direction the operation happens by adding this comment it makes it more obvious. r? @steveklabnik
2016-01-01Added comment in which direction operation happensDaniel Collin-3/+3
2016-01-01Auto merge of #30648 - tshepang:missing-graves, r=steveklabnikbors-2/+2
2015-12-31Auto merge of #30645 - tshepang:grammar, r=steveklabnikbors-2/+2
2015-12-31Auto merge of #30616 - arcnmx:cstr-asref, r=aturonbors-2/+33
Are trait impls still insta-stable? Considering that this design has been around for a long time on `String` and `OsString` it probably doesn't matter much... The `From` impl is a bit strange to me. It's stolen from `OsString` but I'm not really sure about it... `String` just impls `From<&str>` instead, would that make more sense?
2015-12-31CStr impl stabilityarcnmx-4/+4
2015-12-31impl From<&CStr> for CStringarcnmx-7/+7
2015-12-31Auto merge of #30644 - tshepang:typo, r=steveklabnikbors-1/+1
2015-12-30doc: missed these in a4da9acTshepang Lekhonkhobe-2/+2
2015-12-30doc: fix grammarTshepang Lekhonkhobe-2/+2
2015-12-30doc: fix typoTshepang Lekhonkhobe-1/+1
2015-12-30Rollup merge of #30546 - tshepang:add-links, r=steveklabnikSteve Klabnik-15/+36
2015-12-30Rollup merge of #30511 - defyrlt:issue_30507, r=steveklabnikSteve Klabnik-10/+11
Resolves #30507 r? @steveklabnik
2015-12-30doc: add gravesTshepang Lekhonkhobe-23/+23
2015-12-30doc: add some links for io::stdioTshepang Lekhonkhobe-14/+35
2015-12-30Auto merge of #30458 - fhahn:fix-warnings-tests-stdlib, r=sanxiynbors-75/+81
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`. I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as `#[cfg(not(test))]`
2015-12-29AsRef and related conversions for CStringarcnmx-2/+33
2015-12-29Fix warnings when compiling stdlib with --testFlorian Hahn-75/+81