about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2016-06-21Rollup merge of #34371 - frewsxcv:thread-name, r=steveklabnikGuillaume Gomez-0/+31
Add examples for `std::thread::Thread::name`. None
2016-06-21Rollup merge of #34356 - matklad:cstr-docs, r=GuillaumeGomezGuillaume Gomez-0/+32
Document `CStr::as_ptr` dangers. r? @steveklabnik Hi! I've tried to document `CString::new("hello").unwrap().as_ptr()` footgun. Related [RFC] and the original [discussion]. [RFC]: https://github.com/rust-lang/rfcs/pull/1642 [discussion]: https://users.rust-lang.org/t/you-should-stop-telling-people-that-safe-rust-is-always-safe/6094
2016-06-21Fix overflow error in thread::sleepGuillaume Gomez-6/+15
2016-06-19Add examples for `std::thread::Thread::name`.Corey Farwell-0/+31
2016-06-19Auto merge of #34335 - ollie27:docs_collections_mods, r=GuillaumeGomezbors-2/+4
Add short summaries to btree modules Also improve hash_map and hash_set module short summaries. These are missing from [here](https://doc.rust-lang.org/nightly/std/collections/#modules). r? @steveklabnik
2016-06-19Document `CStr::as_ptr` dangers.Aleksey Kladov-0/+32
2016-06-19Auto merge of #34313 - frewsxcv:panicking-example, r=steveklabnikbors-0/+29
Add example in docs for `std::thread::panicking`. None
2016-06-18Auto merge of #34314 - tshepang:misnamed, r=steveklabnikbors-8/+9
doc: fix mis-named binding & remove not needed `mut`
2016-06-17Add short summaries to btree modulesOliver Middleton-2/+4
Also improve hash_map and hash_set module short summaries.
2016-06-18Add example in docs for `std::thread::panicking`.Corey Farwell-0/+29
2016-06-16doc: fix mis-named binding & remove not needed `mut`Tshepang Lekhonkhobe-8/+9
2016-06-16Fix issue where rustbuild expected msvc to have arPeter Atashian-1/+2
Signed-off-by: Peter Atashian <retep998@gmail.com>
2016-06-16Rollup merge of #34270 - gkoz:error_file_exists, r=alexcrichtonManish Goregaokar-1/+12
Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215 Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists
2016-06-15Auto merge of #33300 - seanmonstar:map-entry-take, r=alexcrichtonbors-0/+13
Map::Entry methods to recover key and value together See https://github.com/rust-lang/rust/issues/32281#issuecomment-213066344
2016-06-15Map::Entry::take() method to recover key and value togetherSean McArthur-0/+13
2016-06-15Fix a docs typoGleb Kozyrev-1/+1
2016-06-15Test ErrorKind::AlreadyExists for filesGleb Kozyrev-0/+9
2016-06-14Add ERROR_FILE_EXISTS to ErrorKind conversion on WindowsGleb Kozyrev-0/+2
Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215 Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists
2016-06-13Improve IP reserved address docsOliver Middleton-20/+35
- Add links to all RFCs to make it clear these are not Rust RFCs. - Correct RFC numbers to match the numbers in [RFC 6890](https://tools.ietf.org/html/rfc6890) - Clean up formatting to show addresses and ranges in parentheses like (255.255.255.255)
2016-06-11run rustfmt on libstd/collections/hash folderSrinivas Reddy Thatiparthy-167/+178
2016-06-09doc: intro should be 1 sentenceTshepang Lekhonkhobe-2/+4
Also, do not repeat name of type
2016-06-09use the slice_pat hack in libstd tooAriel Ben-Yehuda-18/+21
2016-06-09fix stdtestAriel Ben-Yehuda-5/+8
2016-06-09address review commentsAriel Ben-Yehuda-5/+5
2016-06-09implement RFC495 semantics for slice patternsAriel Ben-Yehuda-6/+15
non-MIR translation is still not supported for these and will happily ICE. This is a [breaking-change] for many uses of slice_patterns.
2016-06-05test: don't assume anything about the sign of NAN.Eduard Burtescu-4/+10
2016-06-03Auto merge of #33803 - WiSaGaN:feature/rename-main-thread, r=alexcrichtonbors-1/+1
Rename main thread from "<main>" to "main". Fix issue #33789 We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
2016-06-03Auto merge of #33861 - Amanieu:lock_elision_fix, r=alexcrichtonbors-10/+113
Make sure Mutex and RwLock can't be re-locked on the same thread Fixes #33770 r? @alexcrichton
2016-06-02Fix rwlock successfully acquiring a write lock after a read lockAmanieu d'Antras-12/+27
2016-06-02Don't allow pthread_rwlock_t to recursively lock itselfAmanieu d'Antras-9/+52
This is allowed by POSIX and can happen on glibc with processors that support hardware lock elision.
2016-06-02Fix undefined behavior when re-locking a mutex from the same threadAmanieu d'Antras-1/+46
The only applies to pthread mutexes. We solve this by creating the mutex with the PTHREAD_MUTEX_NORMAL type, which guarantees that re-locking from the same thread will deadlock.
2016-06-02Rollup merge of #34033 - tshepang:typo, r=GuillaumeGomezGuillaume Gomez-1/+1
doc: typo
2016-06-02Rollup merge of #34019 - kennytm:fix-33958, r=steveklabnikGuillaume Gomez-2/+3
Restore original meaning of std::fs::read_dir's example changed in #33958 `DirEntry.file_type().is_dir()` will not follow symlinks, but the original example (`fs::metadata(&path).is_dir()`) does. Therefore the change in #33958 introduced a subtle difference that now it won't enter linked folders. To preserve the same behavior, we use `Path::is_dir()` instead, which does follow symlink. (See discussion in the previous PR for detail.)
2016-06-02Rollup merge of #34013 - kraai:fix-link, r=steveklabnikGuillaume Gomez-1/+1
Fix broken link name in `bool` documentation
2016-06-02Rollup merge of #33993 - oconnor663:filedocs, r=alexcrichtonGuillaume Gomez-0/+2
document that Files close themselves automatically
2016-06-02doc: typoTshepang Lekhonkhobe-1/+1
2016-06-01Auto merge of #33853 - alexcrichton:remove-deprecated, r=aturonbors-553/+2
std: Clean out old unstable + deprecated APIs These should all have been deprecated for at least one cycle, so this commit cleans them all out.
2016-06-01Auto merge of #33814 - lambda:rtabort-use-platform-abort, r=alexcrichtonbors-9/+17
Open code the __fastfail intrinsic for rtabort! on windows As described https://msdn.microsoft.com/en-us/library/dn774154.aspx This is a Windows 8+ mechanism for terminating the process quickly, which degrades to either an access violation or bugcheck in older versions. I'm not sure this is better the the current mechanism of terminating with an illegal instruction, but we recently converted unix to terminate more correctly with SIGABORT, and this *seems* more correct for windows. [breaking-change]
2016-06-02Restore original meaning of std::fs::read_dir's example changed in #33958.kennytm-2/+3
DirEntry.file_type().is_dir() will not follow symlinks, but the original example (fs::metadata(&path).is_dir()) does. Therefore the change in #33958 introduced a subtle difference that now it won't enter linked folders. To preserve the same behavior, we use Path::is_dir() instead, which does follow symlink.
2016-06-01allow for the future addition of a close method on FileJack O'Connor-2/+1
2016-06-01Fix broken link name in `bool` documentationMatt Kraai-1/+1
2016-06-01Rollup merge of #33921 - jameysharp:patch-1, r=alexcrichtonManish Goregaokar-0/+2
Inline simple Cursor write calls Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away. Closes issue #33916. r? @alexcrichton
2016-05-31mk: Prepare for a new stage0 compilerAlex Crichton-10/+3
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta compiler. These artifacts are hot off the bots and should be ready to go.
2016-05-31document that Files close themselves automaticallyJack O'Connor-0/+3
2016-05-30std: Clean out old unstable + deprecated APIsAlex Crichton-553/+2
These should all have been deprecated for at least one cycle, so this commit cleans them all out.
2016-05-30Retry on EINTR in Bytes and Chars.Aaron Gallagher-11/+18
Since Bytes and Chars called directly into Read::read, they didn't use any of the retrying wrappers. This allows both iterator types to retry.
2016-05-30Use Path::is_dir() in fs::read_dir()'s example.kennytm-2/+2
Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.
2016-05-28Rollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichtonManish Goregaokar-0/+7
Implement Error trait for fmt::Error type Fixes #33827. r? @alexcrichton Just one last thing: I added a feature name, but don't hesitate to ask me to change it if you think it doesn't fit well.
2016-05-28Rollup merge of #33831 - diwic:patch-1, r=aturonManish Goregaokar-35/+35
panic.rs: fix docs (recover -> catch_unwind) The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
2016-05-27Inline simple Cursor write callsJamey Sharp-0/+2
Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away. Closes issue #33916.