summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-09-27Remove extraneous brackets from abort documentationPirh-1/+1
As per #29370
2017-09-26os_str: Fix too-long linesFederico Mena Quintero-4/+4
2017-09-25Overhaul the documentation for OsString / OsStrFederico Mena Quintero-5/+91
2017-09-25Module overview for std::os::windows:ffiFederico Mena Quintero-1/+57
2017-09-25Point from the error structs back to the method that created them, like in ↵Federico Mena Quintero-5/+24
iterators
2017-09-25Overhaul the ffi::CStr documentation.Federico Mena Quintero-30/+46
2017-09-25Overhaul the ffi::CString docsFederico Mena Quintero-31/+115
Explain the struct's reason for being, and its most common usage patterns. Add a bunch of links. Clarify the method docs a bit. Part of https://github.com/rust-lang/rust/issues/29354
2017-09-25Expand the introduction to the ffi module.Federico Mena Quintero-1/+100
We describe the representation of C strings, and the purpose of OsString/OsStr. Part of https://github.com/rust-lang/rust/issues/29354
2017-09-24Backport libs stabilizations to 1.21 betaDavid Tolnay-1/+1
This includes the following stabilizations: - tcpstream_connect_timeout https://github.com/rust-lang/rust/pull/44563 - iterator_for_each https://github.com/rust-lang/rust/pull/44567 - ord_max_min https://github.com/rust-lang/rust/pull/44593 - compiler_fences https://github.com/rust-lang/rust/pull/44595 - needs_drop https://github.com/rust-lang/rust/pull/44639 - vec_splice https://github.com/rust-lang/rust/pull/44640
2017-09-24LP_CLONE_FDIO_ROOT is now LP_CLONE_FDIO_NAMESPACEJames Tucker-2/+2
2017-09-24Fixed casing issues.P.Y. Laligand-16/+16
2017-09-24The Magenta kernel is now called Zircon.P.Y. Laligand-136/+136
2017-09-24Add doc example to HashMap::hasherEthan Dagner-0/+11
2017-09-24Rollup merge of #44625 - frewsxcv:frewsxcv-raii-stdin, r=QuietMisdreavusGuillaume Gomez-8/+24
Indicate how ChildStd{in,out,err} FDs are closed. Fixes https://github.com/rust-lang/rust/issues/41452.
2017-09-23Simplify implementation of Display and Error for convert::Infallible.Jimmy Cuadra-1/+2
2017-09-23docs improvement std::sync::{PoisonError, TryLockError}Lucas Morales-2/+55
2017-09-23Auto merge of #44436 - MicroJoe:master, r=alexcrichtonbors-0/+23
Add Duration::from_micros This fixes #44400 that explains why it could be useful for embedded designs timing.
2017-09-23Rollup merge of #44778 - lucasem:master, r=estebankCorey Farwell-13/+120
std::sync::RwLock docs improvement Addresses the `RwLock` part of #29377. r? @steveklabnik Added examples, links to types, and a small comparison between RwLock and Mutex.
2017-09-23Rollup merge of #44759 - durka:patch-43, r=steveklabnikCorey Farwell-3/+3
improve english in create_dir_all docs Just minor nitpicking.
2017-09-23Rollup merge of #44712 - oconnor663:copy_test, r=GuillaumeGomezCorey Farwell-1/+2
fix an incorrect assertion in the doc example for `std::io::copy` I think this wasn't caught by CI because the `foo` wrapper function was only defined and not called. This seems to be the norm for doc examples that define a `foo` function. Is that on purpose?
2017-09-23Rollup merge of #44648 - Havvy:doc-size_of, r=dtolnayCorey Farwell-0/+8
Expand size_of docs This PR does 3 things. 1. Adds a description of what pointer size means to the primitive pages for usize and isize. 2. Says the general size of things is not stable from compiler to compiler. 3. Adds a table of sizes of things that we do guarantee. As this is the first table in the libstd docs, I've included a picture of how that looks. ![](https://i.imgur.com/YZ6IChH.png?1)
2017-09-22std::sync::RwLock docs improvementLucas Morales-13/+120
2017-09-22Auto merge of #44624 - tmerr:master, r=sfacklerbors-3/+24
Retain suid/sgid/sticky bits in Metadata.permissions Most users would expect set_permissions(Metadata.permissions()) to be non-destructive. While we can't guarantee this, we can at least pass the needed info to chmod. Also update the PermissionsExt documentation to disambiguate what it contains, and to refer to the underlying value as `st_mode` rather than its type `mode_t`. Closes #44147
2017-09-21impl std::error::Error for convert::Infallible.Jimmy Cuadra-0/+7
2017-09-21Add note about being blocked on input.Corey Farwell-1/+2
2017-09-21Remove platform-specific terminology.Corey Farwell-6/+3
2017-09-21improve english in create_dir_all docsAlex Burka-3/+3
2017-09-20Document stable size_of primitives and pointer size guaranteesHavvy-0/+8
2017-09-20Auto merge of #44525 - aidanhs:aphs-no-null-deref, r=alexcrichtonbors-15/+23
Correctly bubble up errors from libbacktrace Previously the first part of this code didn't check for a null pointer and blindly passed it back down, causing a segfault if libbacktrace failed to initialise. I've changed this to check and bubble up the error if relevant. Suggested diff view: https://github.com/rust-lang/rust/pull/44525/files?w=1
2017-09-20fix an incorrect assertion in the doc example for `std::io::copy`Jack O'Connor-1/+2
2017-09-19Rollup merge of #44703 - GuillaumeGomez:missing-io-links, r=QuietMisdreavusGuillaume Gomez-4/+6
Add some missing links in io docs r? @rust-lang/docs
2017-09-19Rollup merge of #44513 - redox-os:master, r=alexcrichtonGuillaume Gomez-26/+186
[Redox] Sync with upstream syscall library This syncs the vendored syscalls with their upstream versions.
2017-09-19Add some missing links in io docsGuillaume Gomez-4/+6
2017-09-19Auto merge of #44026 - QuietMisdreavus:trimmed-std, r=steveklabnikbors-1/+7
hide internal types/traits from std docs via new #[doc(masked)] attribute Fixes #43701 (hopefully for good this time) This PR introduces a new parameter to the `#[doc]` attribute that rustdoc looks for on `extern crate` statements. When it sees `#[doc(masked)]` on such a statement, it hides traits and types from that crate from appearing in either the "Trait Implementations" section of many type pages, or the "Implementors" section of trait pages. This is then applied to the `libc`/`rand`/`compiler_builtins` imports in libstd to prevent those crates from creating broken links in the std docs. Like in #43348, this also introduces a feature gate, `doc_masked`, that controls the use of this parameter. To view the std docs generated with this change, head to https://tonberry.quietmisdreavus.net/std-43701/std/index.html.
2017-09-18Rollup merge of #44651 - bluss:document-thread-name-no-nuls, r=steveklabnikAlex Crichton-0/+7
Document thread builder panics for nul bytes in thread names This seems to have been undocumented. Mention this where the name is set (Builder::name) and where the panic could happen (Builder::spawn). Thread::new is private and I think the builder is the only user where this matters. A short comment was added to "document" Thread::new too.
2017-09-18Rollup merge of #44537 - oli-obk:memchr, r=alexcrichtonAlex Crichton-6/+4
More `align_offset` things cc #44488
2017-09-18Rollup merge of #44466 - clarcharr:cow_error, r=alexcrichtonAlex Crichton-0/+15
Add Cow<str> -> Box<Error> impls. Considering how impls exist for `String` and `&str`, it makes sense to also add an impl for `Cow<str>` as well. This would allow converting `String::from_utf8_lossy` directly into a `Box<Error>` or `io::Error` without having to add an extra `into_ownd()`.
2017-09-17Remove st_mode maskTrevor Merrifield-3/+3
2017-09-17Add test case for unix permissionsTrevor Merrifield-0/+21
2017-09-17Add a file to trivially disable tool building or testingOliver Schneider-3/+6
2017-09-17Add `<*const T>::align_offset` and use it in `memchr`Oliver Schneider-6/+4
2017-09-17Rollup merge of #44647 - tmerr:fix-44645, r=dtolnayTim Neumann-2/+5
Ensure tcp test case passes when disconnected from network net::tcp::tests::connect_timeout_unroutable fails when the network is unreachable, like on a laptop disconnected from wifi. Check for this error and allow the test to pass. Closes #44645
2017-09-17Rollup merge of #44639 - budziq:stabilize_needs_drop, r=dtolnayTim Neumann-1/+0
stabilized needs_drop (fixes #41890) fixes #41890
2017-09-17Rollup merge of #44622 - frewsxcv:frewsxcv-invalid-link, r=QuietMisdreavusTim Neumann-1/+1
Fix incorrect `into_inner` link in docs. Fixes https://github.com/rust-lang/rust/issues/42373.
2017-09-17std: Document thread builder panics for nul bytes in thread namesUlrik Sverdrup-0/+7
This seems to have been undocumented. Mention this where the name is set (Builder::name) and where the panic could happen (Builder::spawn). Thread::new is private and I think the builder is the only user where this matters. A short comment was added to "document" Thread::new too.
2017-09-17Ensure tcp test case passes when disconnected from networkTrevor Merrifield-2/+5
net::tcp::tests::connect_timeout_unroutable fails when the network is unreachable, like on a laptop disconnected from wifi. Check for this error and allow the test to pass. Closes #44645
2017-09-16Fix network familiesJeremy Soller-2/+2
2017-09-16Rollup merge of #44609 - jonhoo:hash-alloc, r=steveklabnikAlex Crichton-0/+6
Mention that HashMap::new and HashSet::new do not allocate The docs for `HashMap::with_capacity` and `HashSet::with_capacity` already say that > If `capacity` is 0, the hash map/set will not allocate. However, the docs for `::new` do not say that the initial capacity is 0, and thus promise that a call to `::new` alone does not allocate. This PR fixes that.
2017-09-16Rollup merge of #44395 - jcdyer:ip-constructors, r=alexcrichtonAlex Crichton-1/+89
Ipv4Addr and Ipv6Addr convenience constructors. Introduce convenience constructors for common types. This introduces the following constructors: * Ipv6Addr::localhost() * Ipv6Addr::unspecified() * Ipv4Addr::localhost() * Ipv4Addr::unspecified() The recently added `From` implementations were nice for avoiding the fallibility of conversions from strings like `"127.0.0.1".parse().unwrap()`, and `"::1".parse().unwrap()`, but while the Ipv4 version is roughly comparable in verbosity, the Ipv6 version lacks zero-segment elision, which makes it significantly more awkward: `[0, 0, 0, 0, 0, 0, 0, 0].into()`. While there isn't a clear way to introduce zero elision to type that can infallibly be converted into Ipv6 addresses, this PR resolves the problem for the two most commonly used addresses, which, incidentally, are the ones that suffer the most from the lack of zero-segment elision. This change is dead simple, and introduces no backwards incompatibility. See also, [this topic on the inernals board](https://internals.rust-lang.org/t/pre-rfc-convenience-ip-address-constructors/5878)
2017-09-16stabilized needs_drop (fixes #41890)Michal Budzynski-1/+0