about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-03-26Expanded and added links to std::net::{SocketAddr,SocketAddrV4,SocketAddrV6} ↵lukaramu-26/+90
docs Part of #29363 Changed summary sentences of SocketAddr and IpAddr for consistency Linked to SocketAddrV4 and SocketAddrV6 from SocketAddr, moving explaination there Expanded top-level docs for SocketAddrV4 and SocketAddrV6, linking to some relevant IETF RFCs, and linking back to SocketAddr Changed some of the method summaries to third person as per RFC 1574; added links to IETF RFCs where appropriate
2017-03-26Removed link in std::net::ToSocketAddr's summary sentencelukaramu-3/+1
Relative links in trait methods don't resolve in e.g. std/primitive.tuple.html :(
2017-03-26Expanded and added links to std::net::{IpAddr,Ipv4Addr,Ipv6Addr} docslukaramu-42/+160
Part of #29363 Expanded top-level documentation & linked to relevant IETF RFCs. Added a bunch of links (to true/false/Ipv4Addr/etc.) throughout the docs.
2017-03-26Added links to std::net::AddrParseError's documentationlukaramu-1/+13
Additionally changed the summary sentence to be more consistent with most of the other FromStr implementations' error types.
2017-03-26Added links throughout std::net::ToSocketAddrs' documentationlukaramu-17/+35
Part of #29363 In the section about the default implementations of ToSocketAddrs, I moved the bulletpoint of SocketAddrV4 & SocketAddrV6 to the one stating that SocketAddr is constructed trivially, as this is what's actually the case
2017-03-26std::net docs: changed occurences of "RFC" to say "IETF RFC"lukaramu-24/+24
part of #29363
2017-03-26Update std::net:Incoming's docs to use standard iterator boilerplatelukaramu-8/+8
Part of #29363
2017-03-26added missing links in std::net TCP docslukaramu-6/+17
part of #29363
2017-03-26change string references in asciiext r? @steveklabnikaStoate-9/+15
2017-03-25Update ChildStderr docs to be clearerMichael Gattozzi-2/+3
Before the docs only had a line about where it was found and that it was a handle to stderr. This commit changes it so that the summary second line is removed and that it's a bit clearer about what can be done with it. Part of \#29370
2017-03-25Remove extra wait from Child docsMichael Gattozzi-1/+1
2017-03-25Avoid using libc::sigemptyset on AndroidMarco A L Barbosa-2/+25
2017-03-25Rollup merge of #40642 - frewsxcv:io-bufread-doc-examples, r=GuillaumeGomezCorey Farwell-53/+84
Rewrite `io::BufRead` doc examples to better demonstrate behaviors. Prior to this commit, most of the `BufRead` examples used `StdinLock` to demonstrate how certain `BufRead` methods worked. Using `StdinLock` is not ideal since: * Relying on run-time data means we can't show concrete examples of how these methods work up-front. The user is required to run them in order to see how they behave. * If the user tries to run an example in the playpen, it won't work because the playpen doesn't support user input to stdin.
2017-03-25Fix libc::bind call on aarch64-linux-androidMarco A L Barbosa-4/+4
2017-03-25Fix c_char (u8 -> i8) definition for i686-linux-androidMarco A L Barbosa-4/+6
2017-03-24Update `Child` docs to not have a note sectionMichael Gattozzi-11/+9
In #29370 it's noted that for "the Note shouldn't be one, and should come before the examples." This commit changes the positioning of the section and removes wording that said take note in order for it to flow better with the surrounding text and it's new position.
2017-03-24Rollup merge of #40794 - s3rvac:fix-formatting-in-command-envs-docs, ↵Corey Farwell-0/+3
r=steveklabnik Fix formatting in the docs for std::process::Command::envs() An empty line between the *Basic usage:* text and the example is required to properly format the code. Without the empty line, the example is not formatted as code. [Here](https://doc.rust-lang.org/std/process/struct.Command.html#method.envs) you can see the current (improper) formatting.
2017-03-24Add a missing feature attribute to the example for ↵Petr Zemek-0/+2
std::process::Command::envs(). The person who originally wrote the example forgot to include this attribute. This caused Travis CI to fail on commit 9b0a4a4e97 (#40794), which just fixed formatting in the description of std::process::Command::envs().
2017-03-24Fix formatting in the docs for std::process::Command::envs().Petr Zemek-0/+1
An empty line between the "Basic usage:" text and the example is required to properly format the code. Without the empty line, the example is not formatted as code.
2017-03-23Rewrite `io::BufRead` doc examples to better demonstrate behaviors.Corey Farwell-53/+84
Prior to this commit, most of the `BufRead` examples used `StdinLock` to demonstrate how certain `BufRead` methods worked. Using `StdinLock` is not ideal since: * Relying on run-time data means we can't show concrete examples of how these methods work up-front. The user is required to run them in order to see how they behave. * If the user tries to run an example in the playpen, it won't work because the playpen doesn't support user input to stdin.
2017-03-24Document Cursor::new position is 0Stepan Koltsov-0/+4
... even if contained `Vec` is not empty. E. g. for ``` let v = vec![10u8, 20]; let mut c = io::Cursor::new(v); c.write_all(b"aaaa").unwrap(); println!("{:?}", c.into_inner()); ``` result is ``` [97, 97, 97, 97] ``` and not ``` [10, 20, 97, 97, 97, 97] ```
2017-03-23add link to contribution guidelines and IRC roomNick Sweeting-3/+7
2017-03-23newline for breathing roomNick Sweeting-0/+1
2017-03-23requested changesNick Sweeting-1/+2
2017-03-23Add contribution instructions to stdlib docsNick Sweeting-0/+6
2017-03-23Add helpful hint on io function for beginnersNick Sweeting-0/+10
2017-03-23std: Don't cache stdio handles on WindowsAlex Crichton-55/+46
This alters the stdio code on Windows to always call `GetStdHandle` whenever the stdio read/write functions are called as this allows us to track changes to the value over time (such as if a process calls `SetStdHandle` while it's running). Closes #40490
2017-03-22Simplify hash table dropsJosh Stone-47/+18
This replaces the `std::collections::hash::table::RevMoveBuckets` iterator with a simpler `while` loop. This iterator was only used for dropping the remaining elements of a `RawTable`, so instead we can just loop through directly and drop them in place. This should be functionally equivalent to the former code, but a little easier to read. I was hoping it might have some performance benefit too, but it seems the optimizer was already good enough to see through the iterator -- the generated code is nearly the same. Maybe it will still help if an element type has more complicated drop code.
2017-03-21Add missing urls in ptr docsGuillaume Gomez-4/+9
2017-03-20Rollup merge of #40556 - cramertj:stabilize-pub-restricted, r=petrochenkovCorey Farwell-1/+1
Stabilize pub(restricted) Fix https://github.com/rust-lang/rust/issues/32409
2017-03-20Rollup merge of #40332 - steveklabnik:extract-book, r=alexcrichtonCorey Farwell-7/+7
Extract book into a submodule Part of https://github.com/rust-lang/rust/issues/39588 We probably don't want to land this till after the beta branches on friday, but would still ❤️ a review from @alexcrichton , since I am a rustbuild noob. This pr: 1. removes the book 2. adds it back in as a submodule 3. the submodule includes both the old book and the new book 4. it also includes an index page explaining the difference in editions 5. it also includes redirect pages for the old book URLs. 6. so we build all that stuff too. r? @alexcrichton
2017-03-20Rollup merge of #40312 - jdhorwitz:papercut, r=steveklabnikCorey Farwell-0/+21
Papercut r? @steveklabnik
2017-03-20Fix up various linkssteveklabnik-7/+7
The unstable book, libstd, libcore, and liballoc all needed some adjustment.
2017-03-19Rollup merge of #40566 - clarcharr:never_error, r=sfacklerCorey Farwell-0/+6
Implement std::error::Error for !.
2017-03-19Auto merge of #39799 - dpc:create_dir_all, r=alexcrichtonbors-4/+56
Fix race condition in fs::create_dir_all The code would crash if the directory was created after create_dir_all checked whether the directory already existed. This was contrary to the documentation which claimed to create the directory if it doesn't exist, implying (but not stating) that there would not be a failure due to the directory existing.
2017-03-19Rollup merge of #40648 - s3rvac:fix-path-docs-typo, r=frewsxcvCorey Farwell-1/+1
Fix a typo in path.rs docs The name of the variable used in the example is `path`, not `os_str`.
2017-03-19Rollup merge of #40621 - jswalden:dependant-spelling-fix, r=sfacklerCorey Farwell-2/+2
Fix a spelling error in HashMap documentation, and slightly reword surrounding text for precision Noticed while reading docs just now. It's possible that the prior wording *meant* to state that the seed's randomness depends on the exact instant that the system RNG was created, I guess. But unless there's an API guarantee that this is the case, the wording seems over-precise. Is there a formal API guarantee that would forbid, say, the system RNG from generating all output using the Intel RDRAND instruction? I don't think the quality of output in that case would depend on when the RNG was created. Yet it seems to me like it could well be a valid source of randomness when computing the initial seed. For that reason, tying the randomness of the seed, to the quality of the RNG's output *at the precise instant the seed is computed*, seems less confining. That instantaneous quality level could be determined by the quality at the instant the RNG was created -- but instantaneous quality need not be low for that precise reason.
2017-03-19Rollup merge of #40611 - ScottAbbey:patch-1, r=GuillaumeGomezCorey Farwell-1/+1
Fix typo in mutex.rs docs This seems to match other uses of "be accessed" in the document.
2017-03-19Rollup merge of #40590 - z1mvader:master, r=steveklabnikCorey Farwell-0/+2
documented order of conversion between u32 an ipv4addr This fixes https://github.com/rust-lang/rust/issues/40118
2017-03-19Fix a typo in path.rs docsPetr Zemek-1/+1
The name of the variable used in the example is `path`, not `os_str`.
2017-03-18Fix problems left in `concurrent_recursive_mkdir`Dawid Ciężarkiewicz-3/+4
Increase lifetime of `tmpdir`, and really change the length of test path.
2017-03-17Fix `create_dir_all("")`Dawid Ciężarkiewicz-0/+14
Add a test for `""` and `"."`.
2017-03-17Reorder match checks in `create_dir_all`Dawid Ciężarkiewicz-1/+1
Avoid doing `is_dir` in the fast path.
2017-03-17Fix problems found on Windows in `dir_create_all`Dawid Ciężarkiewicz-4/+3
Ignore the type of error altogether. The rationale is: it doesn't matter what was the problem if the directory is there. In the previous versions if the directory was there already we wouldn't even attempt to create it, so we wouldn't know about the problem neither. Make test path length smaller in `concurrent_recursive_mkdir` test.
2017-03-17Break line longer than 100 charactersDawid Ciężarkiewicz-1/+2
2017-03-17Add `concurrent_recursive_mkdir` testDawid Ciężarkiewicz-1/+22
2017-03-17Fix new version of `create_dir_all`Dawid Ciężarkiewicz-2/+2
It will now correctly fail on existing non-directories.
2017-03-17Fix race condition in fs::create_dir_allDavid Roundy-4/+20
It is more robust to not fail if any directory in a path was created concurrently. This change lifts rustc internal `create_dir_racy` that was created to handle such conditions to be new `create_dir_all` implementation.
2017-03-17Fix a spelling error in HashMap documentation, and slightly reword it to be ↵Jeff Walden-2/+2
more precise.
2017-03-17Stabilize rc_raw feature, closes #37197Aaron Turon-2/+1