about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-11-03Remove unused AsciiExt imports and fix tests related to ascii methodsLukas Kalbertodt-3/+5
Many AsciiExt imports have become useless thanks to the inherent ascii methods added in the last commits. These were removed. In some places, I fully specified the ascii method being called to enforce usage of the AsciiExt trait. Note that some imports are not removed but tagged with a `#[cfg(stage0)]` attribute. This is necessary, because certain ascii methods are not yet available in stage0. All those imports will be removed later. Additionally, failing tests were fixed. The test suite should exit successfully now.
2017-11-03Copy `AsciiExt` methods to `str` directlyLukas Kalbertodt-3/+13
This is done in order to deprecate AsciiExt eventually. Note that this commit contains a bunch of `cfg(stage0)` statements. This is due to a new compiler feature this commit depends on: the `slice_u8` lang item. Once this lang item is available in the stage0 compiler, all those cfg flags (and more) can be removed.
2017-11-03Copy `AsciiExt` methods to `[u8]` directlyLukas Kalbertodt-0/+10
This is done in order to deprecate AsciiExt eventually. Note that this commit contains a bunch of `cfg(stage0)` statements. This is due to a new compiler feature I am using: the `slice_u8` lang item. Once this lang item is available in the stage0 compiler, all those cfg flags (and more) can be removed.
2017-11-03Remove examples in doc-comments of `AsciiExt` methodsLukas Kalbertodt-319/+48
The doc comments were incorrect before: since the inherent ascii methods shadow the `AsciiExt` methods, the examples didn't use the `AsciiExt` at all. Since the trait will be deprecated soon anyway, the easiest solution was to remove the examples and already mention that the methods will be deprecated in the near future.
2017-11-03Use direct implementation on u8/char to implement AsciiExtLukas Kalbertodt-280/+41
The methods were copied to u8/char, so we can just use it in AsciiExt impls to avoid duplicate code.
2017-11-03Copy `AsciiExt` methods to `char` directlyLukas Kalbertodt-1/+0
This is done in order to deprecate AsciiExt eventually.
2017-11-03Revert signature of eq_ignore_ascii_case() to originalLukas Kalbertodt-1/+1
Since the methods on u8 directly will shadow the AsciiExt methods, we cannot change the signature without breaking everything. It would have been nice to take `u8` as argument instead of `&u8`, but we cannot break stuff! So this commit reverts it to the original `&u8` version.
2017-11-03Add all methods of AsciiExt to u8 directlyLukas Kalbertodt-1/+1
This is the first step in order to deprecate AsciiExt. Since this is a WIP commit, there is still some code duplication (notably the static arrays) that will be removed later.
2017-11-03auto trait future compatibility lintleonardo.yvens-0/+4
2017-11-03Fix std compile error for windows-gnu targets without `backtrace` featureRolf Karp-2/+2
2017-11-02Make join a link to the function's documentationSebastian Dröge-1/+1
2017-11-02Mention that panics can't possibly be caught when compiling with panic=abortSebastian Dröge-1/+1
2017-11-02Use ` instead of ' for function namesSebastian Dröge-2/+2
2017-11-02Update the std::thread docs and clarify that panics can nowadays be caughtSebastian Dröge-5/+9
2017-11-01RwLock guards are Sync if T isRalf Jung-3/+8
Currently, the compiler requires `T` to also be `Send`. There is no reason for that. `&Rw{Read,Write}LockGuard` only provides a shared referenced to `T`, sending that across threads is safe if `T` is `Sync`.
2017-11-01Auto merge of #45674 - kennytm:rollup, r=kennytmbors-7/+20
Rollup of 14 pull requests - Successful merges: #45450, #45579, #45602, #45619, #45624, #45644, #45646, #45648, #45649, #45650, #45652, #45660, #45664, #45671 - Failed merges:
2017-11-01Rollup merge of #45664 - mbrubeck:docs, r=estebankkennytm-4/+5
Fix incorrect error type in Read::byte docs None
2017-11-01Rollup merge of #45652 - malbarbo:x32-2, r=alexcrichtonkennytm-1/+3
More fixes for x86_64-unknown-linux-gnux32 This update libc (all libc testing are passing) and fixes NR_GETRANDOM. Fix all but one run-pass test (lto-unwind.rs, see https://github.com/rust-lang/rust/issues/45416)
2017-11-01Rollup merge of #45649 - tbu-:pr_doc_bufread_eof, r=estebankkennytm-0/+4
Add a hint what `BufRead` functions do on EOF
2017-11-01Rollup merge of #45648 - tbu-:pr_doc_unix_ext, r=estebankkennytm-2/+8
Update doc comment for the Unix extension module It was a bit outdated, claimed to be able to do less than it actually could.
2017-11-01Auto merge of #45267 - oconnor663:rwlock_send, r=alexcrichtonbors-1/+1
remove the `T: Sync` requirement for `RwLock<T>: Send` 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. @hniksic and I [were discussing this on reddit](https://www.reddit.com/r/rust/comments/763o7r/blog_posts_introducing_lockfree_rust_comparing/dobcvbm/). I might be totally wrong about this change being sound, but I'm super curious to find out :)
2017-10-31Auto merge of #44764 - nvzqz:master, r=alexcrichtonbors-0/+10
Implement TryFrom<&[T]> for &[T; N] There are many cases where a buffer with a static compile-time size is preferred over a slice with a dynamic size. This allows for performing a checked conversion from `&[T]` to `&[T; N]`. This may also lead to compile-time optimizations involving `[T; N]` such as loop unrolling. This is my first PR to Rust, so I'm not sure if discussion of this change should happen here or does it need its own RFC? I figured these changes would be a subset of #33417.
2017-10-31add missing docs for MetadataExtGuillaume Gomez-0/+246
2017-10-31add description to libstdDoug Goldstein-0/+1
Include a description field for libstd in Cargo metadata.
2017-10-31add repository info to libstdDoug Goldstein-0/+1
Include the repository info for libstd in the Cargo metadata.
2017-10-31add license data to libstdDoug Goldstein-0/+1
Include the license of libstd in the cargo metadata
2017-10-31Fix incorrect error type in Read::byte docsMatt Brubeck-4/+5
2017-10-31Fix NR_GETRANDOM for linux x32Marco A L Barbosa-1/+3
2017-10-31Add a hint what `BufRead` functions do on EOFTobias Bucher-0/+4
2017-10-31Update doc comment for the Unix extension moduleTobias Bucher-2/+8
It was a bit outdated, claimed to be able to do less than it actually could.
2017-10-31Implement From<SendError<T>> for TrySendError<T>Julien Cretin-2/+11
2017-10-29Auto merge of #45295 - Technius:docs/process, r=steveklabnikbors-11/+72
Improve std::process module docs Addresses part of #29370 I've changed the first `cat` example to a "Hello World" example involving echo, and I've also added another example showing how to pipe output. I'm still working on the module-level description. For now, I'd like feedback on the examples. r? @steveklabnik
2017-10-28Add no_run to process examples involving unix commandsBryan Tan-2/+2
2017-10-28Rollup merge of #45449 - frewsxcv:frewsxcv-udp-nonblocking, r=sfacklerkennytm-4/+33
Improve docs for UdpSocket::set_nonblocking. Closes https://github.com/rust-lang/rust/issues/44050.
2017-10-27Auto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrumbors-18/+12
Bump to 1.23 and update bootstrap This commit updates the bootstrap compiler, bumps the version to 1.23, updates Cargo, updates books, and updates crates.io dependencies
2017-10-27Auto merge of #45524 - alexcrichton:improve-park-unpark, r=dtolnaybors-15/+72
std: Optimize thread park/unpark implementation 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-26Bump to 1.23 and update bootstrapAlex Crichton-18/+12
This commit updates the bootstrap compiler, bumps the version to 1.23, updates Cargo, updates books, and updates crates.io dependencies
2017-10-26Improve docs for UdpSocket::set_nonblocking.Corey Farwell-4/+33
Closes https://github.com/rust-lang/rust/issues/44050.
2017-10-26Rollup merge of #45059 - tmccombs:pid, r=alexcrichtonkennytm-0/+31
Add current_pid function Fixes #44971
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