summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2017-03-17Stabilize process_abort feature, closes #37838Aaron Turon-1/+1
2017-03-17Fix typo in mutex.rs docsScottAbbey-1/+1
This seems to match other uses of "be accessed" in the document.
2017-03-17Auto merge of #40598 - frewsxcv:rollup, r=frewsxcvbors-205/+253
Rollup of 23 pull requests - Successful merges: #40387, #40433, #40452, #40456, #40457, #40458, #40463, #40466, #40467, #40495, #40496, #40497, #40499, #40500, #40503, #40505, #40512, #40514, #40517, #40520, #40536, #40545, #40586 - Failed merges:
2017-03-17Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfacklerCorey Farwell-14/+4
std: remove a workaround for privacy limitations `std::thread::Thread` implements a non-exported `NewThread` trait to allow for internal-only use of `Thread::new`. Nowadays we have `pub(crate)`, which accomplishes the same thing but much more idiomatically. Rustdoc handles this correctly (I checked and I didn't see `Thread::new` on the rustdoc entry for `Thread` with this change), and the stage1 `rustc` emits the correct error still (I'm assuming that the stage1 compiler uses my `libstd`?): ``` $ ./build/x86_64-apple-darwin/stage1/bin/rustc test.rs error: method `new` is private --> test.rs:4:18 | 4 | let thread = thread::Thread::new(None); | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error ```
2017-03-17Rollup merge of #40458 - frewsxcv:frewsxcv-osstr, r=GuillaumeGomezCorey Farwell-0/+58
Add doc examples for `OsStr`, `OsString`. None
2017-03-17Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnikCorey Farwell-27/+27
Update usages of 'OSX' (and other old names) to 'macOS'. As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-03-17Rollup merge of #40456 - frewsxcv:frewsxcv-docs-function-parens, ↵Corey Farwell-164/+164
r=GuillaumeGomez Remove function invokation parens from documentation links. This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-16Merge branch 'master' into frewsxcv-osstrCorey Farwell-21/+104
2017-03-16documented order of conversion between u32 an ipv4addrz1mvader-0/+2
2017-03-15Stabilize pub(restricted)Taylor Cramer-1/+1
2017-03-15Implement Error for !.Clar Charr-0/+6
2017-03-15Removes Default for Box<Path>.Clar Charr-14/+0
2017-03-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-21/+104
Leftovers from #39594; From<Box> impls These are a few more impls that follow the same reasoning as those from #39594. What's included: * `From<Box<str>> for String` * `From<Box<[T]>> for Vec<T>` * `From<Box<CStr>> for CString` * `From<Box<OsStr>> for OsString` * `From<Box<Path>> for PathBuf` * `Into<Box<str>> for String` * `Into<Box<[T]>> for Vec<T>` * `Into<Box<CStr>> for CString` * `Into<Box<OsStr>> for OsString` * `Into<Box<Path>> for PathBuf` * `<Box<CStr>>::into_c_string` * `<Box<OsStr>>::into_os_string` * `<Box<Path>>::into_path_buf` * Tracking issue for latter three methods + three from previous PR. Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-14Add doc example for `OsString::into_boxed_os_str`.Corey Farwell-0/+12
2017-03-14Add doc example for `OsString::shrink_to_fit`.Corey Farwell-0/+16
2017-03-14Add doc example for `OsString::reserve_exact`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsString::reserve`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsStr::to_os_string`.Corey Farwell-0/+10
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-164/+164
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-13std: remove a workaround for privacy limitations that isn't necessary anymoreSean Gillespie-14/+4
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-27/+27
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-03-11Implement placement-in protocol for `HashMap`Charlie Fan-5/+183
2017-03-10Rollup merge of #40410 - clarcharr:os_string_shrink_to_fit, r=alexcrichtonAlex Crichton-0/+25
OsString::shrink_to_fit. Considering how the other capacity-related methods are there, I found it odd that this one wasn't included. Will create a tracking issue once I get an OK on this.
2017-03-10Rollup merge of #40386 - tbu-:pr_display_frombyteswithnulerror, r=alexcrichtonAlex Crichton-6/+40
Distinguish the ways `CStr::from_bytes_with_nul` can fail
2017-03-10Add From<Box<..>> implementations.Clar Charr-21/+104
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+25
2017-03-10travis: Fuchsia builderPetr Hosek-3/+0
This change introduces a Dockerfile and script which builds a complete Fuchsia toolchain which can be used to build Rust distribution for Fuchsia. We only support cross-compiling at the moment, hence only setting the target.
2017-03-09Removed RustFMT changesJoshua Horwitz-0/+21
2017-03-09Distinguish the ways `CStr::from_bytes_with_nul` can failTobias Bucher-6/+40
2017-03-08Rollup merge of #40283 - oconnor663:args_docs, r=alexcrichtonAriel Ben-Yehuda-0/+8
clarify docs for Args and ArgsOs The args() and args_os() docs include a line about how the first element is usually the program name. Include that line in the struct docs too.
2017-03-08Rollup merge of #40237 - arthurprs:hm-adapt2, r=alexcrichtonAriel Ben-Yehuda-24/+74
Reduce size overhead of adaptative hashmap Exposes a boolean flag in RawTable and use it instead of a bool field in HashMap. Taking a bit from capacity or length would make overflow handling tricky. Fixes: #40042