about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-10-26Rollup merge of #45059 - tmccombs:pid, r=alexcrichtonkennytm-0/+31
Add current_pid function Fixes #44971
2017-10-25Rollup merge of #45361 - GuillaumeGomez:fs-docs, r=QuietMisdreavusGuillaume Gomez-1/+241
Add missing code examples r? @rust-lang/docs
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-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-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-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-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-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
2017-10-11ffi/c_str.rs: Make all descriptions have a single-sentence summary at the ↵Federico Mena Quintero-15/+16
beginning Per https://github.com/rust-lang/rust/pull/44855#discussion_r144048837 and subsequent ones.
2017-10-11Auto merge of #44963 - JLockerman:fix_spsc, r=alexcrichtonbors-107/+192
Improve performance of spsc_queue and stream. This PR makes two main changes: 1. It switches the `spsc_queue` node caching strategy from keeping a shared counter of the number of nodes in the cache to keeping a consumer only counter of the number of node eligible to be cached. 2. It separates the consumer and producers fields of `spsc_queue` and `stream` into a producer cache line and consumer cache line. Overall, it speeds up `mpsc` in `spsc` mode by 2-10x. Variance is higher than I'd like (that 2-10x speedup is on one benchmark), I believe this is due to the drop check in `send` (`fn stream::Queue::send:107`). I think this check can be combined with the sleep detection code into a version which only uses 1 shared variable, and only one atomic access per `send`, but I haven't looked through the select implementation enough to be sure. The code currently assumes a cache line size of 64 bytes. I added a CacheAligned newtype in `mpsc` which I expect to reuse for `shared`. It doesn't really belong there, it would probably be best put in `core::sync::atomic`, but putting it in `core` would involve making it public, which I thought would require an RFC. Benchmark runner is [here](https://github.com/JLockerman/queues/tree/3eca46279c53eb75833c5ecd416de2ac220bd022/shootout), benchmarks [here](https://github.com/JLockerman/queues/blob/3eca46279c53eb75833c5ecd416de2ac220bd022/queue_bench/src/lib.rs#L170-L293). Fixes #44512.
2017-10-10Remove misleading line on Windows Subsystem stdioPirh-9/+0
2017-10-10Rollup merge of #44775 - MaloJaffre:debug-struct, r=sfacklerkennytm-46/+35
Refactor to use `debug_struct` in several Debug impls Also use `pad` and derive `Debug` for `Edge`. Fixes #44771.
2017-10-10Auto merge of #45141 - kennytm:rollup, r=kennytmbors-6/+115
Rollup of 9 pull requests - Successful merges: #44962, #45051, #45091, #45106, #45117, #45118, #45120, #45125, #45136 - Failed merges:
2017-10-10Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundibors-3/+1
Migrate to eprint/eprintln macros where appropriate. None
2017-10-09Document defaults for stdin, stdout, and stderr methods of CommandPirh-0/+27
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-46/+35
Fixes #44771.