about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2015-12-23Rollup merge of #30465 - androm3da:master, r=alexcrichtonSteve Klabnik-1/+1
The `dynamic_lib` library has been deprecated in favor of contents on crates.io, but apparently `libloading` is a more specific direction that fits the need.
2015-12-23Implement custom panic handlersSteven Fackler-8/+150
2015-12-23doc: make line visibleTshepang Lekhonkhobe-1/+1
2015-12-22Removed usage of `drop` from `std::net::UdpSocket` docsdefyrlt-10/+11
Resolves #30507
2015-12-22Auto merge of #30417 - alexcrichton:better-detect-elf-tls, r=alexcrichtonbors-77/+49
Currently a compiler can be built with the `--disable-elf-tls` option for compatibility with OSX 10.6 which doesn't have ELF TLS. This is unfortunate, however, as a whole new compiler must be generated which can take some time. These commits add a new (feature gated) `cfg(target_thread_local)` annotation set by the compiler which indicates whether `#[thread_local]` is available for use. The compiler now interprets `MACOSX_DEPLOYMENT_TARGET` (a standard environment variable) to set this flag on OSX. With this we may want to start compiling our OSX nightlies with `MACOSX_DEPLOYMENT_TARGET` set to 10.6 which would allow the compiler out-of-the-box to generate 10.6-compatible binaries. For now the compiler still by default targets OSX 10.7 by allowing ELF TLS by default (e.g. if `MACOSX_DEPLOYMENT_TARGET` isn't set).
2015-12-21std: Remove rust_builtin C support libraryAlex Crichton-77/+105
All these definitions can now be written in Rust, so do so!
2015-12-21std: Use cfg(target_thread_local) in thread_local!Alex Crichton-77/+49
This transitions the standard library's `thread_local!` macro to use the freshly-added and gated `#[cfg(target_thread_local)]` attribute. This greatly simplifies the `#[cfg]` logic in play here, but requires that the standard library expose both the OS and ELF TLS implementation modules as unstable implementation details. The implementation details were shuffled around a bit but end up generally compiling to the same thing. Closes #26581 (this supersedes the need for the option) Closes #27057 (this also starts ignoring the option)
2015-12-22Add an impl for Box<Error> from String.Michael Sproul-0/+9
Closes #30156.
2015-12-21std: Ensure AssertRecoverSafe indeed is more oftenAlex Crichton-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-21Auto merge of #30352 - alexcrichton:new-snashots, r=nikomatsakisbors-25/+2
Lots of cruft to remove!
2015-12-21Register new snapshotsAlex Crichton-25/+2
Lots of cruft to remove!
2015-12-21unbreak openbsd codeSébastien Marie-1/+1
- upgrades libc to version with si_addr support in openbsd - declares libc use for getentropy
2015-12-20Corrected deprecation reference to appropriate crateebadf-1/+1
2015-12-20Auto merge of #30454 - mmcco:size_t, r=alexcrichtonbors-2/+2
It returns sizeof(dirent_t), so I'm not sure why its return type is int. It's only used once, and that usage immediately casts it to usize.
2015-12-19Auto merge of #30430 - mmcco:master, r=alexcrichtonbors-1/+62
Rust already supports Linux's getrandom(2), which is very similar and was based on getentropy(2). This is a pretty clean, simple addition that uses the same approach as the iOS randomness API support.
2015-12-19Auto merge of #30403 - webmobster:master, r=alexcrichtonbors-0/+27
I didn't see any reason that debug couldn't be added to this object, since every field derives debug.
2015-12-18Use libc's syscall() and NR_GETENTROPY constMichael McConville-7/+1
2015-12-18Merge branch 'master' of https://github.com/rust-lang/rustMichael McConville-4/+396
2015-12-19Auto merge of #30381 - fhahn:memchr-in-std, r=alexcrichtonbors-4/+396
This PR adds `memchr`and `memrchr` based on @BurntSushi 's rust-memchr crate to libstd (as discussed in #30151). I've update some places in libstd to use memchr/memrchr, but I am not sure if there are other places where it could be used as well. ref #30076