about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-04-22std::net: add Ipv4Addr::is_shared()Corentin Henry-0/+22
2019-04-22std::net: add Ipv4Addr::is_ietf_protocol_assignment()Corentin Henry-0/+34
2019-04-22std::net: add Ipv4Addr::is_benchmarking()Corentin Henry-0/+25
2019-04-22std::net: add Ipv4Addr::is_reserved()Corentin Henry-0/+28
2019-04-21use SecRandomCopyBytes on macOS in MiriRalf Jung-1/+4
2019-04-20Auto merge of #59826 - llogiq:multi-dbg, r=SimonSapinbors-1/+22
allow multiple args to `dbg!(..)` This closes #59763
2019-04-20std::net: fix doc markdown in Ipv6Addr::is_unique_local()Corentin Henry-1/+1
2019-04-20std::net: add Ipv6Addr::is_unicast_link_local_strict()Corentin Henry-6/+96
RFC 4291 is a little unclear about what is a unicast link local address. According to section 2.4, the entire fe80::/10 range is reserved for these addresses, but section 2.5.3 defines a stricter format for such addresses. After a discussion[0] is has been decided to add a different method for each definition, so this commit: - renames is_unicast_link_local() into is_unicast_link_local_strict() - relaxed the check in is_unicast_link_local() [0]: https://github.com/rust-lang/rust/issues/27709#issuecomment-400370706
2019-04-20std::net: improve Ipv6Addr::is_unicast_site_local() docCorentin Henry-2/+11
- quote the RFC - add a link to the RFC - fix markdown
2019-04-20std::net: site-local ipv6 prefixes are globalCorentin Henry-4/+14
2019-04-19Add implementations of last in terms of next_back on a bunch of ↵Kyle Huey-0/+24
DoubleEndedIterators. r?Manishearth
2019-04-19extend ui testAndre Bogus-1/+12
2019-04-19Fix sync_all on macos/iosDavid Vázquez Púa-2/+9
sync_all should flush all metadata in macos/ios, so it should call fcntl with the F_FULLFSYNC flag as sync_data does. Fixes #55920
2019-04-19Rollup merge of #60078 - matklad:patch-1, r=shepmasterMazdak Farrokhzad-1/+1
Use more realistic example for thread builder Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
2019-04-19Rollup merge of #60041 - jnferner:patch-1, r=shepmasterMazdak Farrokhzad-2/+1
Simplify the returning of a Result a bit
2019-04-18Use more realistic example for thread builderAleksey Kladov-1/+1
Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
2019-04-18Simplify the returning of a Result a bitJan Nils Ferner-2/+1
2019-04-18Rollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppeMazdak Farrokhzad-4/+3
Remove collection-specific `with_capacity` documentation from `std::collections` Fixes #59931 The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle. The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
2019-04-17Document `Item` type in `std::env::SplitPaths` iterator.Nathan Kleyn-1/+7
Previously there wasn't any documentation to show what the type of `Item` was inside `std::env::SplitPaths`. Now, in the same format as other examples of docs in `srd` for `Iterator#Item`, we mention the type. This fixes #59543.
2019-04-16SGX target: change re-entry abort logicJethro Beekman-19/+11
2019-04-16Add a comment explaining why SecRandomCopyBytes is not used on MacOSEd Barnard-0/+7
2019-04-15Rollup merge of #59955 - RalfJung:stdsimd, r=alexcrichtonMazdak Farrokhzad-3/+4
bump stdsimd; make intra_doc_link_resolution_failure an error again; make lints more consistent I made `intra_doc_link_resolution_failure` warn so that it would properly respect `deny-warnings = false` in `config.toml`. `#[warn]` still become errors with `-D warnings` so I thought this was fine. Turns out however that we don't pass `-D warnings` when running rustdoc, so for additional rustdoc-lints we need to set them to `deny`. Also sue the opportunity to make the lint flags more consistent between libcore, liballoc, libstd. Cc @gnzlbg for the *big* stdsimd update.
2019-04-15Rollup merge of #59648 - alex:must-use-result, r=alexcrichtonMazdak Farrokhzad-1/+1
Add must_use annotations to Result::is_ok and is_err Discussed in #59610
2019-04-15Remove collection-specific `with_capacity` doc from `std::collections`Marc-4/+3
Fixes #59931
2019-04-14Rollup merge of #59906 - czipperz:bufwriter-use-getmut, r=kennytmMazdak Farrokhzad-2/+2
Make BufWriter use get_mut instead of manipulating inner in Write implementation `get_mut` allows us to abstract over the implementation detail of inner being optional.
2019-04-14make lint levels more consistentRalf Jung-3/+4
2019-04-14Rollup merge of #59852 - alexcrichton:more-vectored, r=sfacklerMazdak Farrokhzad-37/+247
std: Add `{read,write}_vectored` for more types This commit implements the `{read,write}_vectored` methods on more types in the standard library, namely: * `std::fs::File` * `std::process::ChildStd{in,out,err}` * `std::io::Std{in,out,err}` * `std::io::Std{in,out,err}Lock` * `std::io::Std{in,out,err}Raw` Where supported the OS implementations hook up to native support, otherwise it falls back to the already-defaulted implementation.
2019-04-14Rollup merge of #59835 - lzutao:nonzero-signed, r=Mark-SimulacrumMazdak Farrokhzad-0/+2
Re-export NonZero signed variant in std Closes #59834 .
2019-04-14Rollup merge of #59830 - ehuss:keyword-links, r=Mark-SimulacrumMazdak Farrokhzad-30/+25
Fix links on keyword docs. - Make links relative. - Adjust links from old 2018-edition book. - Fix broken link in `let` docs.
2019-04-14Rollup merge of #59818 - crlf0710:eliminate_libstd_fnbox, r=cramertjMazdak Farrokhzad-24/+15
Eliminate `FnBox` usages from libstd.
2019-04-14Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichtonMazdak Farrokhzad-1/+0
Stabilize the `alloc` crate. This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Rollup merge of #59892 - rylev:as-raw-fd, r=alexcrichtonMazdak Farrokhzad-67/+190
Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket r? @alexcrichton
2019-04-12Stabilize the `alloc` crate.Simon Sapin-1/+0
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-11Make BufWriter use get_mut instead of manipulating inner in Write implementationChris Gregory-2/+2
get_mut allows us to abstract over the implementation detail of inner being optional.
2019-04-11Impl RawFd converstion traits for TcpListener, TcpStream and UdpSocketRyan Levick-67/+190
2019-04-10SGX target: fix cfg(test) buildJethro Beekman-3/+3
2019-04-10std: Add `{read,write}_vectored` for more typesAlex Crichton-37/+247
This commit implements the `{read,write}_vectored` methods on more types in the standard library, namely: * `std::fs::File` * `std::process::ChildStd{in,out,err}` * `std::io::Std{in,out,err}` * `std::io::Std{in,out,err}Lock` * `std::io::Std{in,out,err}Raw` Where supported the OS implementations hook up to native support, otherwise it falls back to the already-defaulted implementation.
2019-04-10Apply suggestions from code review Mazdak Farrokhzad-2/+2
Use dbg! recursively on each item Co-Authored-By: llogiq <bogusandre@gmail.com>
2019-04-10allow multiple args to `dbg!(..)`Andre Bogus-0/+10
2019-04-10Re-export NonZero signed variant in stdLzu Tao-0/+2
2019-04-10Eliminate `FnBox` usages from libstd.CrLF0710-24/+15
2019-04-09Fix links on keyword docs.Eric Huss-30/+25
- Make links relative. - Adjust links from old 2018-edition book. - Fix broken link in `let` docs.
2019-04-08Add must_use annotations to Result::is_ok and is_errAlex Gaynor-1/+1
2019-04-07Auto merge of #59765 - lzutao:patch-1, r=Centrilbors-1/+3
Add reference to cfg attr r? @QuietMisdreavus
2019-04-07Auto merge of #59119 - cramertj:cx-back, r=withoutboatsbors-29/+40
Future-proof the Futures API cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs r? @withoutboats
2019-04-07Add reference to cfg attrlzutao-1/+3
2019-04-06Rollup merge of #59740 - cuviper:folded-extend, r=scottmcmMazdak Farrokhzad-6/+2
Use for_each to extend collections This updates the `Extend` implementations to use `for_each` for many collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`, `TokenStream`, `VecDeque`, and `Wtf8Buf`. Folding with `for_each` enables better performance than a `for`-loop for some iterators, especially if they can just forward to internal iterators, like `Chain` and `FlatMap` do.
2019-04-05Change `copytest` parameter name from `y` to `sign`Will Hakes-10/+10
2019-04-06Rollup merge of #59727 - alexcrichton:wasi-apis, r=fitzgenMazdak Farrokhzad-87/+86
wasi: Use shared API for preopened fds This commit updates the wasi target with supported added in CraneStation/wasi-sysroot#10. That function allows both C and Rust to cooperate in how preopened files are managed, enabling us to learn about propened files through the same interface. The `open_parent` function in the wasi `fs` module was updated to avoid its own initialization of a global preopened map and instead delegate to libc to perform this functionality. This should both be more robust into the future in terms of handling path logic as well as ensuring the propened map is correctly set up at process boot time. This does currently require some unfortunate allocations on our side, but if that becomes an issue we can always paper over those in time!
2019-04-06Rollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichtonMazdak Farrokhzad-41/+44
SGX target: Use linker option to avoid code CGU assignment kludge cc @VardhanThigle @faern