about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-10-25std: Optimize thread park/unpark implementationAlex Crichton-15/+72
This is an adaptation of alexcrichton/futures-rs#597 for the standard library. The goal here is to avoid locking a mutex on the "fast path" for thread park/unpark where you're waking up a thread that isn't sleeping or otherwise trying to park a thread that's already been notified. Mutex performance varies quite a bit across platforms so this should provide a nice consistent speed boost for the fast path of these functions.
2017-10-25Rollup merge of #45361 - GuillaumeGomez:fs-docs, r=QuietMisdreavusGuillaume Gomez-1/+241
Add missing code examples r? @rust-lang/docs
2017-10-25Implement From<RecvError> for TryRecvError and RecvTimeoutErrorJulien Cretin-0/+18
2017-10-24Auto merge of #45446 - leodasvacas:remove-libcollections, r=alexcrichtonbors-1/+0
Remove deprecated `collections` crate. The real `collections` was merged with `alloc`, this facade was introduced [in this PR](https://github.com/rust-lang/rust/pull/42720) to give `#[no_std]` users time to adapt. This was done at least two cycles ago, now we can consider removing it for good.
2017-10-24Fix doc build on other architectures than linuxGuillaume Gomez-17/+17
2017-10-22Auto merge of #45451 - durka:patch-45, r=steveklabnikbors-2/+2
fix stringify docs Update `stringify!` docs to show actual accepted syntax. Reported [on reddit](https://www.reddit.com/r/rust/comments/76o8rh/hey_rustaceans_got_an_easy_question_ask_here/dopzwys/).
2017-10-22fix stringify docs in stdAlex Burka-2/+2
2017-10-22Remove deprecated `collections` crate.leonardo.yvens-1/+0
This reverts commit 6484258f1749499d3e51685df867b3d460a7f0be.
2017-10-22Improve docs around `Once::call_once_force` and `OnceState`.Corey Farwell-13/+81
2017-10-22Auto merge of #45400 - alexcrichton:bootstrap-thinlto, r=Mark-Simulacrumbors-0/+3
rustbuild: Compile rustc with ThinLTO This commit enables ThinLTO for the compiler as well as multiple codegen units. This is intended to get the benefits of parallel codegen while also avoiding any major loss of perf. Finally this commit is also intended as further testing for #45320 and shaking out bugs.
2017-10-21Rollup merge of #45419 - steveklabnik:fix-commonmark-renderings, ↵Corey Farwell-6/+7
r=QuietMisdreavus Fix most rendering warnings from switching to CommonMark There's one big one lift, I'm filing a bug for it soon. r? @rust-lang/docs
2017-10-21Rollup merge of #45227 - frewsxcv:frewsxcv-set-nonblocking, r=sfacklerCorey Farwell-7/+66
Expand docs/examples for TCP `set_nonblocking` methods. Part of https://github.com/rust-lang/rust/issues/44050.
2017-10-21Expand docs/examples for TCP `set_nonblocking` methods.Corey Farwell-7/+66
Part of https://github.com/rust-lang/rust/issues/44050.
2017-10-21Auto merge of #45391 - malbarbo:x32-1, r=alexcrichtonbors-7/+8
Update libc and some fixes for x86_64-unknown-linux-gnux32
2017-10-21Auto merge of #45370 - alexcrichton:update-windows-rand, r=sfacklerbors-46/+10
std: Update randomness implementation on Windows This commit updates the OS random number generator on Windows to match the upstream implementation in the `rand` crate. First proposed in rust-lang-nursery/rand#111 this implementation uses a "private" API of `RtlGenRandom`. Despite the [documentation][dox] indicating this is a private function its widespread use in Chromium and Firefox as well as [comments] from Microsoft internally indicates that it's highly unlikely to break. Another motivation for switching this is to also attempt to make progress on #44911. It may be the case that this function succeeds while the previous implementation may fail in "weird" scenarios. [dox]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa387694(v=vs.85).aspx [comments]: https://github.com/rust-lang-nursery/rand/issues/111#issuecomment-316140155
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-6/+7
2017-10-20[test] Add some `#[inline]` to `HashMap`Alex Crichton-0/+3
2017-10-20Fix some tests for linux gnux32Marco A L Barbosa-7/+8
2017-10-19Add missing code examplesGuillaume Gomez-1/+241
2017-10-18std: Update randomness implementation on WindowsAlex Crichton-46/+10
This commit updates the OS random number generator on Windows to match the upstream implementation in the `rand` crate. First proposed in rust-lang-nursery/rand#111 this implementation uses a "private" API of `RtlGenRandom`. Despite the [documentation][dox] indicating this is a private function its widespread use in Chromium and Firefox as well as [comments] from Microsoft internally indicates that it's highly unlikely to break. Another motivation for switching this is to also attempt to make progress on #44911. It may be the case that this function succeeds while the previous implementation may fail in "weird" scenarios. [dox]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa387694(v=vs.85).aspx [comments]: https://github.com/rust-lang-nursery/rand/issues/111#issuecomment-316140155
2017-10-18Implement is_empty() for BufReaderJonathan Behrens-0/+25
2017-10-19Rollup merge of #45340 - stjepang:localkey-state-doc-skip-uninitialized, ↵kennytm-1/+4
r=alexcrichton Docs: a LocalKey might start in the Valid state Add a comment to the docs for `LocalKey::state` explaining that some keys might skip the `Uninitialized` state and start in the `Valid` state. cc #27716 r? @alexcrichton
2017-10-17Add child process IO handling docsBryan Tan-7/+18
2017-10-17Rollup merge of #45339 - xfix:patch-4, r=steveklabnikkennytm-3/+4
Update array documentation for Clone trait changes Just a note, for this to work, `T` doesn't have to `Copy`, `Clone` is sufficient. For instance, the following works. ```rust fn x(a: &[String; 100]) -> [String; 100] { a.clone() } ```
2017-10-17Rollup merge of #45329 - rust-lang:duplicate-word, r=QuietMisdreavuskennytm-2/+2
Remove duplicated word r? @rust-lang/docs
2017-10-17Rollup merge of #45151 - Pirh:stdio_default_docs, r=frewsxcvkennytm-0/+18
Document defaults for stdin, stdout, and stderr methods of Command For #29370
2017-10-17Docs: a LocalKey might start in the Valid stateStjepan Glavina-1/+4
2017-10-17Update array documentation for Clone trait changesKonrad Borowski-3/+4
2017-10-17Remove duplicated wordGuillaume Gomez-2/+2
2017-10-15Create section on how to spawn processes; change module descriptionBryan Tan-14/+28
2017-10-15Fix std::process hello world exampleBryan Tan-1/+1
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-12/+1
2017-10-15Auto merge of #45299 - kennytm:rollup, r=kennytmbors-20/+49
Rollup of 9 pull requests - Successful merges: #45113, #45250, #45255, #45258, #45263, #45264, #45269, #45280, #45289 - Failed merges:
2017-10-15Rollup merge of #45269 - sfackler:connect-timeout-fix, r=alexcrichtonkennytm-4/+24
Fix TcpStream::connect_timeout on linux Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes #45265. r? @alexcrichton
2017-10-15Rollup merge of #45263 - Manishearth:hashmap-clean, r=blusskennytm-16/+16
Do some cleanups for hashmaps @mystor noticed some things whilst reading through the hashmap RawTable code. Firstly, in RawTable we deal with this hash_offset value that is the offset of the list of hashes from the buffer start. This is always zero, and this isn't consistently used (which means that we would have bugs if we set it to something else). We should just remove this since it doesn't help us at all. Secondly, the probing length tag is not copied when cloning a raw table. This is minor and basically means we do a bit more work than we need on further inserts on a cloned hashmap. r? @Gankro
2017-10-15Rollup merge of #45113 - Pirh:process_output_links, r=steveklabnikkennytm-0/+9
Link std::process::Output to Command and Child As per #29370
2017-10-15Auto merge of #45224 - malbarbo:x32, r=alexcrichtonbors-1/+1
Add x86_64-unknown-linux-gnux32 target This adds X32 ABI support for Linux on X86_64. Let's package and dist it so we can star testing libc, libstd, etc. Fixes https://github.com/rust-lang/rfcs/issues/1339
2017-10-14Fixed accidental deletion of colonBryan Tan-1/+1
2017-10-14Add a brief description and two examples to std::processBryan Tan-7/+43
2017-10-14Fix TcpStream::connect_timeout on linuxSteven Fackler-4/+24
Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes #45265.
2017-10-14std: Set probe length tag on cloned hashmapsManish Goregaokar-0/+1
This isn't strictly necessary for hashmap cloning to work. The tag is used to hint for an upcoming resize, so it's good to copy this information over. (We can do cleverer things like actually resizing the hashmap when we see the tag, or even cleaning up the entry order, but this requires more thought and might not be worth it)
2017-10-14std: Get rid of hash_offet in RawTableManish Goregaokar-16/+15
This offset is always zero, and we don't consistently take it into account. This is okay, because it's zero, but if it ever changes we're going to have bugs (e.g. in the `dealloc` call, where we don't take it into account). It's better to remove this for now; if we ever have a need for a nonzero offset we can add it back, and handle it properly when we do so.
2017-10-13remove the `T: Sync` requirement for `RwLock<T>: Send`Jack O'Connor-1/+1
That requirement makes sense for containers like `Arc` that don't uniquely own their contents, but `RwLock` is not one of those. This restriction was added in https://github.com/rust-lang/rust/commit/380d23b5d4b9fb8f5f0ebf178590f61528b2483e, but it's not clear why.
2017-10-13Add line break after summary of process::OutputPirh-3/+5
2017-10-13Rollup merge of #44855 - federicomenaquintero:master, r=steveklabnikkennytm-67/+442
Improved docs for CStr, CString, OsStr, OsString This expands the documentation for those structs and their corresponding traits, per https://github.com/rust-lang/rust/issues/29354
2017-10-11Bump cc to 1.01 to include x86_64-unknown-linux-gnux32 supportMarco A L Barbosa-1/+1
2017-10-11ffi/mod.rs: Use only one space after a period ending a sentenceFederico Mena Quintero-20/+20
2017-10-11ffi/mod.rs: Keep the one-sentence summary at the beginning of the moduleFederico Mena Quintero-0/+2
2017-10-11ffi/c_str.rs: Use only one space after a period ending a sentenceFederico Mena Quintero-8/+8
2017-10-11ffi/c_str.rs: Fix method/function confusionFederico Mena Quintero-3/+3
Per https://github.com/rust-lang/rust/pull/44855#discussion_r144049179