summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2015-12-28Auto merge of #30548 - mmcco:linux-syscall, r=brsonbors-5/+1
There's no need for us to redeclare it in an extern block. We should probably put the syscall number constants in libc too.
2015-12-28Instant/SystemTime doc: add meaning to first lineSimon Sapin-3/+4
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.)
2015-12-28Auto merge of #30570 - fhartwig:dead-doc-links, r=steveklabnikbors-6/+5
r? @steveklabnik
2015-12-26Fix links in docs for std::ioFlorian Hartwig-4/+4
2015-12-26Fix link that is currently broken due to bad markupFlorian Hartwig-2/+1
2015-12-25libstd: unix process spawning: fix bug with setting stdioIvan Petkov-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
2015-12-25Rollup merge of #30513 - alexcrichton:assert-is-safe, r=aturonManish Goregaokar-15/+19
Types like `&AssertRecoverSafe<T>` and `Rc<AssertRecoverSafe<T>>` were mistakenly not considered recover safe, but the point of the assertion wrapper is that it indeed is! This was caused by an interaction between the `RecoverSafe` and `NoUnsafeCell` marker traits, and this is updated by adding an impl of the `NoUnsafeCell` marker trait for `AssertRecoverSafe` to ensure that it never interacts with the other negative impls of `RecoverSafe`. cc #30510
2015-12-25Rollup merge of #30485 - sfackler:panic-handler, r=alexcrichtonManish Goregaokar-8/+150
r? @alexcrichton
2015-12-23Use libc's Linux syscall()Michael McConville-5/+1
There's no need for us to redeclare it in an extern block.
2015-12-23Rollup merge of #30537 - tshepang:make-visible, r=GankroSteve Klabnik-1/+1