about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2020-01-08Use matches macro in libcore and libstdIgor Aleksanov-34/+8
2020-01-06Auto merge of #66899 - msizanoen1:riscv-std, r=alexcrichtonbors-4/+20
Standard library support for riscv64gc-unknown-linux-gnu Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support. r? @alexcrichton
2020-01-05Rollup merge of #67879 - ollie27:float_sqrt_neg, r=rkruppeDylan DPC-2/+2
Remove negative number check from float sqrt It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.
2020-01-04Remove negative number check from float sqrtOliver Middleton-2/+2
It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.
2020-01-04Rollup merge of #67137 - anp:tracked-panic-internals, r=eddybDylan DPC-28/+34
libstd uses `core::panic::Location` where possible. cc @eddyb
2020-01-04Clean up comments in panicking infra.Adam Perry-11/+8
2020-01-04core and std macros and panic internals use panic::Location::caller.Adam Perry-17/+26
2020-01-04Rollup merge of #67848 - ollie27:float_link_name_attr, r=Dylan-DPCGuillaume Gomez-3/+0
Remove unused `#[link_name = "m"]` attributes These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway. They should have triggered a compile error: #47725
2020-01-03Remove unused `#[link_name = "m"]` attributesOliver Middleton-3/+0
These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway.
2020-01-03Auto merge of #67828 - JohnTitor:rollup-qmswkkl, r=JohnTitorbors-28/+30
Rollup of 10 pull requests Successful merges: - #67450 (Allow for setting a ThinLTO import limit during bootstrap) - #67595 (Suggest adding a lifetime constraint for opaque type) - #67636 (allow rustfmt key in [build] section) - #67736 (Less-than is asymmetric, not antisymmetric) - #67762 (Add missing links for insecure_time) - #67783 (Warn for bindings named same as variants when matching against a borrow) - #67796 (Ensure that we process projections during MIR inlining) - #67807 (Use drop instead of the toilet closure `|_| ()`) - #67816 (Clean up err codes) - #67825 (Minor: change take() docs grammar to match other docs) Failed merges: r? @ghost
2020-01-03Rollup merge of #67807 - lzutao:toilet-closure, r=CentrilYuki Okushi-28/+28
Use drop instead of the toilet closure `|_| ()`
2020-01-02Use drop instead of the toilet closure `|_| ()`Lzu Tao-28/+28
2020-01-01Add support for RISC-V 64-bit GNU/Linuxmsizanoen1-4/+20
2019-12-31Revert "core: add IntoFuture trait and support for await"Wesley Wiser-6/+1
This reverts commit f35517ee861dc012ccc26083dd4520045e2c4f6f.
2019-12-31Add missing links for insecure_timeLzu Tao-0/+2
2019-12-30Rollup merge of #67622 - gilescope:async-keyword-doc, r=CentrilYuki Okushi-4/+23
Some keyword documentation. I thought about going into detail, but I'd much rather route them to the async book asap.
2019-12-29Some keyword documentation.Giles Cope-4/+23
2019-12-28Change "be returning" to "return"Matthew Kraai-1/+1
2019-12-28Auto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrumbors-20/+20
tidy: change msdn links to newer locations see accouncement at https://docs.microsoft.com/welcome-to-docs The script that I used: https://gist.github.com/lzutao/1449c9210ad91899841d62e0058d2caa
2019-12-28Rollup merge of #67659 - SimonSapin:matches, r=rkruppeOliver Scherer-1/+0
Stabilize the `matches!` macro Fixes https://github.com/rust-lang/rust/issues/65721 FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119
2019-12-28Rollup merge of #67635 - Mark-Simulacrum:path-doc-unsafe, r=dtolnayOliver Scherer-0/+7
Document safety of Path casting I would personally feel more comfortable making the relevant (internal anyway) types repr(transparent) and then documenting that we can make these casts because of that, but I believe this is a more minimal PR, so posting it first. Resolves #45910.
2019-12-28Rollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnikOliver Scherer-5/+5
Convert collapsed to shortcut reference links
2019-12-28Rollup merge of #67629 - kraai:remove-redundant-link-texts, r=steveklabnikOliver Scherer-4/+4
Remove redundant link texts Most of these links are followed by a parenthesized expression. I think that the redundant link texts were added to prevent interpretation as an inline link. This is unnecessary since the closing square bracket and opening parenthesis are separated by whitespace.
2019-12-28Rollup merge of #65244 - seanmonstar:into-future, r=seanmonstarOliver Scherer-1/+6
add IntoFuture trait and support for await The [async-await RFC](https://rust-lang.github.io/rfcs/2394-async_await.html#the-await-compiler-built-in) mentions being able to `await` anything implementing `IntoFuture`. Somewhere along the way, it was left out.
2019-12-27core: add IntoFuture trait and support for awaitSean McArthur-1/+6
2019-12-27Stabilize the `matches!` macroSimon Sapin-1/+0
Fixes https://github.com/rust-lang/rust/issues/65721 FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119
2019-12-26Document safety of Path castingMark Rousskov-0/+7
2019-12-26Implement padding for IpAddr without heap allocDario Gonzalez-13/+80
2019-12-26Convert collapsed to shortcut reference linksMatthew Kraai-5/+5
2019-12-26Remove redundant link textsMatthew Kraai-4/+4
2019-12-25tidy: change msdn links to newer locationsLzu Tao-20/+20
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-24Deprecate Error::description for realDavid Tolnay-124/+79
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-24x.py fmt after previous deignoreMark Rousskov-137/+184
2019-12-24Rollup merge of #67561 - euclio:remove-description, r=jonas-schievinkMazdak Farrokhzad-31/+5
remove `description` from `Error` impls in docs Since `description` is soft-deprecated, there's no need to show it implemented in these examples.
2019-12-23remove `description` from `Error` impls in docsAndy Russell-31/+5
2019-12-23Rollup merge of #67233 - Luro02:cursor_traits, r=sfacklerMazdak Farrokhzad-1/+13
Add PartialEq and Eq to Cursor closes #67226
2019-12-22Format the worldMark Rousskov-3577/+3805
2019-12-22add partialeq and eq to cursorLuro02-1/+13
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-44/+44
2019-12-20Rollup merge of #67442 - reitermarkus:dummy-variable, r=kennytmMazdak Farrokhzad-18/+9
Remove `SOCK_CLOEXEC` dummy variable on platforms that don't use it.
2019-12-20Rollup merge of #67219 - jsgf:command-argv0-debug, r=joshtriplettMazdak Farrokhzad-2/+6
Fix up Command Debug output when arg0 is specified. PR https://github.com/rust-lang/rust/pull/66512 added the ability to set argv[0] on Command. As a side effect, it changed the Debug output to print both the program and argv[0], which in practice results in stuttery output (`"echo" "echo" "foo"`). This PR reverts the behaviour to the the old one, so that the command is only printed once - unless arg0 has been set. In that case it emits `"[command]" "arg0" "arg1" ...`.
2019-12-20Remove `SOCK_CLOEXEC` dummy variable on platforms that don't use it.Markus Reiter-18/+9
2019-12-19Correct the todo! stabilization versionJakub Kądziołka-1/+1
2019-12-19Rollup merge of #67389 - reitermarkus:dummy-variable, r=shepmasterMazdak Farrokhzad-12/+6
Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.
2019-12-19Rollup merge of #67321 - lzutao:htons, r=dtolnayMazdak Farrokhzad-22/+11
make htons const fn This may partially help #67315.
2019-12-19Rollup merge of #67270 - alexcrichton:write-more-line-writer, r=sfacklerMazdak Farrokhzad-1/+171
std: Implement `LineWriter::write_vectored` This commit implements the `write_vectored` method of the `LineWriter` type. First discovered in bytecodealliance/wasmtime#629 the `write_vectored` method of `Stdout` bottoms out here but only ends up writing the first buffer due to the default implementation of `write_vectored`. Like `BufWriter`, however, `LineWriter` can have a non-default implementation of `write_vectored` which tries to preserve the vectored-ness as much as possible. Namely we can have a vectored write for everything before the newline and everything after the newline if all the stars align well. Also like `BufWriter`, though, special care is taken to ensure that whenever bytes are written we're sure to signal success since that represents a "commit" of writing bytes.
2019-12-18Propagate cfg bootstrapMark Rousskov-10/+7
2019-12-18Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.Markus Reiter-12/+6
2019-12-16Fix up Command Debug output when arg0 is specified.Jeremy Fitzhardinge-2/+6
PR https://github.com/rust-lang/rust/pull/66512 added the ability to set argv[0] on Command. As a side effect, it changed the Debug output to print both the program and argv[0], which in practice results in stuttery output ("echo echo foo"). This PR reverts the behaviour to the the old one, so that the command is only printed once - unless arg0 has been set. In that case it emits "[command] arg0 arg1 ...".
2019-12-16Rollup merge of #67308 - dtolnay:fast_rebind, r=alexcrichtonMazdak Farrokhzad-15/+0
Delete flaky test net::tcp::tests::fast_rebind This test is unreliable for at least 3 users on two platforms: see #57509 and #51006. It was added 5 years ago in #22015. Do we know whether this is testing something important that would indicate a bug in our implementation, or if it's fine to remove? r? @sfackler @alexcrichton because this somewhat resembles #59018 Closes #57509. Closes #51006.