Corey Farwell
6e848be5f8
Indicate how the JoinHandle struct is created.
2016-06-24 08:13:30 -04:00
bors
7189ae3611
Auto merge of #34399 - alexcrichton:issue-audit, r=brson
...
std: Fix up stabilization discrepancies
* Remove the deprecated `CharRange` type which was forgotten to be removed
awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
stabilized as part of #32804
2016-06-24 03:39:47 -07:00
Tobias Bucher
9347ffcf5c
Bubble up the errors in set_nonblocking and set_cloexec
2016-06-24 11:31:58 +02:00
bors
4d9faf3632
Auto merge of #34077 - durka:patch-23, r=alexcrichton
...
upgrade thread_local! invocation syntax
Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items. In particular, `#![forbid(missing_docs, unused)]` is now tenable on a crate/module containing thread locals.
For an example see [here](https://is.gd/aVFZZF ). This change is fully backwards compatible as far as I can tell.
cc @frankmcsherry
2016-06-23 19:22:51 -07:00
Alex Crichton
c3e8c178ab
std: Fix up stabilization discrepancies
...
* Remove the deprecated `CharRange` type which was forgotten to be removed
awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
stabilized as part of #32804
2016-06-23 14:08:11 -07:00
Tobias Bucher
a32244b3d9
Don't ignore errors of syscalls in std::sys::unix::fd
...
If any of these syscalls fail, it indicates a programmer error that
should not be silently ignored.
2016-06-23 13:57:55 +02:00
Tobias Bucher
8ff5c4394c
Use len instead of size_hint where appropiate
...
This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
2016-06-23 12:26:15 +02:00
Alex Burka
fc28ee256a
upgrade thread_local! invocation syntax
...
Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items.
2016-06-22 20:29:37 -04:00
Oliver Middleton
f1531254af
Use the correct types in float examples
2016-06-22 23:33:07 +01:00
Emilio Cobos Álvarez
b94b15852c
std: sync: Implement recv_timeout()
2016-06-22 20:48:55 +02:00
Corey Farwell
64137c485a
Parameters in doc comment should be formatted code-like.
2016-06-22 08:24:16 -04:00
Manish Goregaokar
c749a3e4b5
Rollup merge of #34404 - ollie27:concat_idents, r=alexcrichton
...
Mark concat_idents! unstable
This is mostly just a documentation fix as I don't think stability
attributes have any effect on macros.
[before](https://doc.rust-lang.org/nightly/std/macro.concat_idents!.html ) [after](https://ollie27.github.io/rust_doc_test/std/macro.concat_idents!.html )
2016-06-22 09:51:09 +01:00
Manish Goregaokar
2aaf6a0e5c
Rollup merge of #34363 - GuillaumeGomez:sleep, r=alexcrichton
...
Fix overflow error in thread::sleep
Fixes #34330
I added a test to have a more clear error inside the function. Since `time_t` is `i64` and we expect `u64`, maybe we should changed the awaited type?
2016-06-22 09:51:07 +01:00
Oliver Middleton
1cc54d0327
Mark concat_idents! unstable
...
This is mostly just a documentation fix as I don't think stability
attributes have any effect on macros.
2016-06-21 23:30:15 +01:00
Guillaume Gomez
592c314baf
Rollup merge of #34371 - frewsxcv:thread-name, r=steveklabnik
...
Add examples for `std:🧵 :Thread::name`.
None
2016-06-21 23:54:28 +02:00
Guillaume Gomez
3f43b01681
Rollup merge of #34356 - matklad:cstr-docs, r=GuillaumeGomez
...
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-21 23:54:28 +02:00
Guillaume Gomez
c02414e9bd
Fix overflow error in thread::sleep
2016-06-21 15:50:27 +02:00
Corey Farwell
d5a27594a3
Add examples for std: 🧵 :Thread::name.
2016-06-19 17:55:57 -04:00
bors
8d8a88f4a5
Auto merge of #34335 - ollie27:docs_collections_mods, r=GuillaumeGomez
...
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-19 12:56:13 -07:00
Aleksey Kladov
677aa47d68
Document CStr::as_ptr dangers.
2016-06-19 15:14:51 +03:00
bors
d06f1dcd7d
Auto merge of #34313 - frewsxcv:panicking-example, r=steveklabnik
...
Add example in docs for `std:🧵 :panicking`.
None
2016-06-19 02:24:15 -07:00
bors
8545424b96
Auto merge of #34314 - tshepang:misnamed, r=steveklabnik
...
doc: fix mis-named binding & remove not needed `mut`
2016-06-18 01:58:28 -07:00
Oliver Middleton
fdeda33a9a
Add short summaries to btree modules
...
Also improve hash_map and hash_set module short summaries.
2016-06-17 23:50:34 +01:00
Corey Farwell
9944b223a2
Add example in docs for std: 🧵 :panicking.
2016-06-18 00:17:36 +02:00
Tshepang Lekhonkhobe
1253e82b7f
doc: fix mis-named binding & remove not needed mut
2016-06-16 23:20:58 +02:00
Peter Atashian
e0992df35f
Fix issue where rustbuild expected msvc to have ar
...
Signed-off-by: Peter Atashian <retep998@gmail.com>
2016-06-16 08:38:06 -04:00
Manish Goregaokar
e3d6bb1f71
Rollup merge of #34270 - gkoz:error_file_exists, r=alexcrichton
...
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-16 01:39:44 +01:00
bors
9b06d2ad33
Auto merge of #33300 - seanmonstar:map-entry-take, r=alexcrichton
...
Map::Entry methods to recover key and value together
See https://github.com/rust-lang/rust/issues/32281#issuecomment-213066344
2016-06-15 07:37:27 -07:00
Sean McArthur
217a964027
Map::Entry::take() method to recover key and value together
2016-06-15 05:45:50 -07:00
Gleb Kozyrev
552afd30d0
Fix a docs typo
2016-06-15 13:06:48 +03:00
Gleb Kozyrev
1db97575cc
Test ErrorKind::AlreadyExists for files
2016-06-15 13:05:43 +03:00
Gleb Kozyrev
5db9424de3
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-14 12:10:42 +03:00
Oliver Middleton
61043fd3c1
Improve IP reserved address docs
...
- 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-13 23:49:04 +01:00
Srinivas Reddy Thatiparthy
bb19d1dc2e
run rustfmt on libstd/collections/hash folder
2016-06-11 05:12:14 +05:30
Tshepang Lekhonkhobe
3dfc8c1869
doc: intro should be 1 sentence
...
Also, do not repeat name of type
2016-06-09 23:23:09 +02:00
Ariel Ben-Yehuda
f0174fcbee
use the slice_pat hack in libstd too
2016-06-09 00:38:38 +03:00
Ariel Ben-Yehuda
a673cedf7b
fix stdtest
2016-06-09 00:38:38 +03:00
Ariel Ben-Yehuda
8ac3b46cac
address review comments
2016-06-09 00:38:38 +03:00
Ariel Ben-Yehuda
5c717a6fc2
implement RFC495 semantics for slice patterns
...
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-09 00:38:38 +03:00
Eduard Burtescu
27673610a6
test: don't assume anything about the sign of NAN.
2016-06-05 19:17:42 +03:00
bors
c81c75076c
Auto merge of #33803 - WiSaGaN:feature/rename-main-thread, r=alexcrichton
...
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-03 19:36:32 -07:00
bors
9552bcdd92
Auto merge of #33861 - Amanieu:lock_elision_fix, r=alexcrichton
...
Make sure Mutex and RwLock can't be re-locked on the same thread
Fixes #33770
r? @alexcrichton
2016-06-03 04:09:31 -07:00
Amanieu d'Antras
fc4b356125
Fix rwlock successfully acquiring a write lock after a read lock
2016-06-02 14:34:00 +01:00
Amanieu d'Antras
960d1b74c5
Don't allow pthread_rwlock_t to recursively lock itself
...
This is allowed by POSIX and can happen on glibc with processors
that support hardware lock elision.
2016-06-02 13:31:01 +01:00
Amanieu d'Antras
d73f5e65ec
Fix undefined behavior when re-locking a mutex from the same thread
...
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-02 13:31:01 +01:00
Guillaume Gomez
7399403f38
Rollup merge of #34033 - tshepang:typo, r=GuillaumeGomez
...
doc: typo
2016-06-02 13:47:08 +02:00
Guillaume Gomez
083e013086
Rollup merge of #34019 - kennytm:fix-33958, r=steveklabnik
...
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-02 13:47:08 +02:00
Guillaume Gomez
82d9103700
Rollup merge of #34013 - kraai:fix-link, r=steveklabnik
...
Fix broken link name in `bool` documentation
2016-06-02 13:47:07 +02:00
Guillaume Gomez
1d9e713121
Rollup merge of #33993 - oconnor663:filedocs, r=alexcrichton
...
document that Files close themselves automatically
2016-06-02 13:47:07 +02:00
Tshepang Lekhonkhobe
920129a258
doc: typo
2016-06-02 13:30:26 +02:00