Tobias Bucher
6aa0182520
Update documentation to reflect ignoring of unknown addresses
2016-06-29 11:44:33 +02:00
Tobias Bucher
a03a82e5e0
Convert a simple tail call to a loop
2016-06-29 11:39:56 +02:00
Tobias Bucher
d6237cefcb
Ignore unknown address types when looking up hosts
...
Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.
This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.
2016-06-29 11:39:56 +02:00
Guillaume Gomez
dd56a6ad08
Rollup merge of #34524 - frewsxcv:std-io-sink, r=GuillaumeGomez
...
Add doc example for `std::io::sink`.
None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
dcc8fa5270
Rollup merge of #34518 - frewsxcv:io-repeat, r=GuillaumeGomez
...
Add doc example for `std::io::repeat`.
None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
f47fcc738b
Rollup merge of #34517 - frewsxcv:empty, r=GuillaumeGomez
...
Minor rewrite of `std::io::empty` doc example.
None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
f8453a1d17
Rollup merge of #34475 - frewsxcv:path-component, r=GuillaumeGomez
...
Expand `std::path::Component` documentation.
Indicate how it gets created and add an example.
2016-06-28 16:05:15 +02:00
Guillaume Gomez
adc70bdc90
Rollup merge of #34415 - ollie27:docs_float, r=steveklabnik
...
Use the correct types in float examples
r? @steveklabnik
2016-06-28 16:05:14 +02:00
Guillaume Gomez
5d6b41f3bc
Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton
...
Add example for `std:🧵 :sleep`.
None
2016-06-28 16:05:14 +02:00
Corey Farwell
325e09e952
Add doc example for std::io::sink.
2016-06-28 08:22:44 -04:00
Corey Farwell
a350ca62cd
Minor rewrite of std::io::empty doc example.
...
Remove unnecessary hidden `foo` function.
Demonstrate this emptiness of the resulting string.
Combine imports.
2016-06-27 22:28:28 -04:00
Corey Farwell
18b094bdbd
Add doc example for std::io::repeat.
2016-06-27 21:23:53 -04:00
Corey Farwell
a7b9e5441b
Add example for std: 🧵 :sleep.
2016-06-27 13:06:20 -04:00
Corey Farwell
f1d600c6f8
Expand std::path::Component documentation.
...
Indicate how it gets created and add an example.
2016-06-26 20:22:12 -04:00
bors
15e8a67c47
Auto merge of #34469 - frewsxcv:path-components, r=GuillaumeGomez
...
Indicate how the `std::path::Components` struct is created.
None
2016-06-25 22:06:35 -07:00
bors
c12eb1d7a2
Auto merge of #34468 - frewsxcv:doc-links, r=GuillaumeGomez
...
Add hyperlinks to `std::fs` functions from `std::path`.
None
2016-06-25 19:24:29 -07:00
bors
2cfd91d0ce
Auto merge of #34465 - frewsxcv:builder-name-example, r=GuillaumeGomez
...
Add doc example for `std:🧵 :Builder::name`.
None
2016-06-25 15:47:31 -07:00
bors
91c0d04943
Auto merge of #34410 - frewsxcv:code-like, r=apasel422
...
Parameters in doc comment should be formatted code-like.
None
2016-06-25 13:01:31 -07:00
Corey Farwell
f300fafccd
Indicate how the std::path::Components struct is created.
2016-06-25 10:05:01 -04:00
Corey Farwell
c55f0922aa
Add hyperlinks to std::fs functions from std::path.
2016-06-25 09:26:41 -04:00
Manish Goregaokar
80b352c892
Rollup merge of #34438 - frewsxcv:joinhandle, r=GuillaumeGomez
...
Indicate how the `JoinHandle` struct is created.
None
2016-06-25 18:16:40 +05:30
Corey Farwell
fd388d40ed
Add doc example for std: 🧵 :Builder::name.
2016-06-25 07:22:19 -04:00
bors
35004b42bc
Auto merge of #34452 - frewsxcv:unwrap-or, r=alexcrichton
...
Use `Option::expect` instead of `unwrap_or_else` with `panic!`.
None
2016-06-24 23:14:12 -07:00
bors
c128e9bb2e
Auto merge of #34441 - tbu-:pr_dont_ignore_errors, r=alexcrichton
...
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-24 18:28:23 -07:00
Corey Farwell
5e9b75e2dd
Add examples in docs for JoinHandle.
2016-06-24 12:25:26 -04:00
bors
4b89debc7b
Auto merge of #34425 - tbu-:pr_len_instead_of_size_hint, r=alexcrichton
...
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-24 09:03:54 -07:00
Corey Farwell
0a6ce30161
Use Option::expect instead of unwrap_or_else with panic!.
2016-06-24 08:19:22 -04:00
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