about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-09-30Merge remote-tracking branch 'upstream/master'Nikolai Vazquez-170/+448
2017-09-30Cast inner type in OsStr::bytesNikolai Vazquez-1/+1
The innermost type is not [u8] on all platforms but is assumed to have the same memory layout as [u8] since this conversion was done via mem::transmute before.
2017-09-30Auto merge of #44936 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-3/+67
Rollup of 15 pull requests - Successful merges: #44124, #44287, #44320, #44694, #44708, #44794, #44797, #44824, #44836, #44840, #44845, #44854, #44889, #44900, #44903 - Failed merges:
2017-09-30address some `FIXME`s whose associated issues were marked as closedNiv Kaminer-5/+5
remove FIXME(#13101) since `assert_receiver_is_total_eq` stays. remove FIXME(#19649) now that stability markers render. remove FIXME(#13642) now the benchmarks were moved. remove FIXME(#6220) now that floating points can be formatted. remove FIXME(#18248) and write tests for `Rc<str>` and `Rc<[u8]>` remove reference to irelevent issues in FIXME(#1697, #2178...) update FIXME(#5516) to point to getopts issue 7 update FIXME(#7771) to point to RFC 628 update FIXME(#19839) to point to issue 26925
2017-09-29Rollup merge of #44824 - dtolnay:22really21, r=alexcrichtonMark Simulacrum-1/+1
Backport libs stabilizations to 1.21 beta 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 These have been backported in https://github.com/rust-lang/rust/pull/44823.
2017-09-29Rollup merge of #44797 - lucasem:master, r=frewsxcvMark Simulacrum-2/+55
docs improvement std::sync::{PoisonError, TryLockError} Addresses the `PoisonError` and `TryLockError` parts of #29377. Adds examples and links. r? @steveklabnik
2017-09-29Rollup merge of #44794 - napen123:master, r=frewsxcvMark Simulacrum-0/+11
Add doc example to HashMap::hasher None
2017-09-29Auto merge of #44174 - jimmycuadra:try-from-infallible, r=sfacklerbors-0/+8
Add blanket TryFrom impl when From is implemented. Adds `impl<T, U> TryFrom<T> for U where U: From<T>`. Removes `impl<'a, T> TryFrom<&'a str> for T where T: FromStr` (originally added in #40281) due to overlapping impls caused by the new blanket impl. This removal is to be discussed further on the tracking issue for TryFrom. Refs #33417. /cc @sfackler, @scottmcm (thank you for the help!), and @aturon
2017-09-29Enable required features for core::array in libstdNikolai Vazquez-0/+2
2017-09-29Implement Error trait for TryFromSliceErrorNikolai Vazquez-0/+8
2017-09-28Fix imports in TcpStream::local_addr docs exampleleavehouse-1/+1
Add a missing import and remove unused imports
2017-09-28Fix TcpStream::local_addr example codeleavehouse-2/+2
The local address's port is not 8080 in this example, that's the remote peer address port. On my machine, the local address is different every time, so I've changed `assert_eq` to only test the IP address
2017-09-28Auto merge of #44278 - Binero:master, r=BurntSushibors-0/+30
Allow replacing HashMap entries This is an obvious API hole. At the moment the only way to retrieve an entry from a `HashMap` is to get an entry to it, remove it, and then insert a new entry. This PR allows entries to be replaced.
2017-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-3/+1
2017-09-28Fix errors in Box<Path> conversionsNikolai Vazquez-2/+4
2017-09-28Update to the `cc` crateAlex Crichton-3/+3
This is the name the `gcc` crate has moved to
2017-09-28Remove unused 'mem' import in 'path' moduleNikolai Vazquez-1/+0
2017-09-28Remove mem::transmute used in Path conversionsNikolai Vazquez-8/+9
2017-09-28Remove unused 'mem' import in 'os_str' moduleNikolai Vazquez-1/+0
2017-09-28Remove mem::transmute used in OsStr conversionsNikolai Vazquez-7/+10
2017-09-28Fix mutability error in CString::from_rawNikolai Vazquez-1/+1
2017-09-28Remove mem::transmute used in CStr conversionsNikolai Vazquez-7/+8
2017-09-27Made `fs::copy` return the length of the main streamStephane Raux-7/+22
On Windows with the NTFS filesystem, `fs::copy` would return the sum of the lengths of all streams, which can be different from the length reported by `metadata` and thus confusing for users unaware of this NTFS peculiarity. This makes `fs::copy` return the same length `metadata` reports which is the value it used to return before PR #26751. Note that alternate streams are still copied; their length is just not included in the returned value. This change relies on the assumption that the stream with index 1 is always the main stream in the `CopyFileEx` callback. I could not find any official document confirming this but empirical testing has shown this to be true, regardless of whether the alternate stream is created before or after the main stream. Resolves #44532
2017-09-27Explain difference between panic! and abort in abort docsPirh-1/+10
As per #29370
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