about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-04-22Remove double trailing newlinesvarkor-10/+0
2019-04-22std::net: tests for Ipv4addr::is_reserved()Corentin Henry-0/+15
Also add tests to IpAddr for make sure these addresses are not global or multicast.
2019-04-22std::net: tests for Ipv4addr::is_ietf_protocol_assignment()Corentin Henry-0/+16
Also add tests to IpAddr to make sure these addresses are not global.
2019-04-22std::net: tests for Ipv4addr::is_benchmarking()Corentin Henry-16/+30
also add test to Ipaddr, making sure that these addresses are not global.
2019-04-22std::net: tests for Ipv6addr::is_unicast_link_local{_strict}()Corentin Henry-20/+49
2019-04-22std::net: fix tests for site-local ipv6 addressesCorentin Henry-2/+2
Ipv6Addr::is_unicast_global() now returns `true` for unicast site local addresses, since they are deprecated.
2019-04-22std::net: fix Ipv4addr::is_global() testsCorentin Henry-4/+4
Ipv4addr::is_global() previously considered 0/8 was global, but has now been fixed, so these tests needed to be fixed as well.
2019-04-22std::net: use macros to test ip propertiesCorentin Henry-143/+381
2019-04-22std::net: fix documentation markdownCorentin Henry-3/+5
2019-04-22std::net: fix Ipv4Addr::is_global()Corentin Henry-8/+64
As per @therealbstern's comment[0]: The implementation of Ipv4::is_global is not complete, according to the IANA IPv4 Special-Purpose Address Registry. - It compares the address to 0.0.0.0, but anything in 0.0.0.0/8 should not be considered global. - 0/8 is not global and is currently forbidden because some systems used to treat it as the local network. - The implementation of Ipv4::is_unspecified is correct. 0.0.0.0 is the unspecified address. - It does not examine 100.64.0.0/10, which is "Shared Address Space" and not global. - Ditto 192.0.0.0/24 (IETF Protocol Assignments), except for 192.0.0.9/32 and 192.0.0.10/32, which are carved out as globally reachable. - 198.18.0.0/15 is for "Benchmarking" and should not be globally reachable. - 240.0.0.0/4 is reserved and not currently reachable
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