about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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.
2019-12-15make htons const fnLzu Tao-22/+11
2019-12-15Rollup merge of #67282 - pjw91:patch-1, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix example code of OpenOptions::open The example didn't set the access mode flag, which resulted in an `Err(InvalidInput)`. r? @steveklabnik
2019-12-15Rollup merge of #67267 - alexcrichton:update-wasi-libc, r=Dylan-DPCMazdak Farrokhzad-14/+21
Fix signature of `__wasilibc_find_relpath` Looks like this function changed upstream, so it needs to be adjusted for when used by libstd.
2019-12-14Delete flaky test net::tcp::tests::fast_rebindDavid Tolnay-15/+0
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-3/+12
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-3/+5
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-14Revert "Redefine `core::convert::Infallible` as `!`."Niko Matsakis-0/+7
This reverts commit 089229a1935fa9795cfdefa518c8f8c3beb66db8.
2019-12-14Auto merge of #67136 - oli-obk:const_stability, r=Centrilbors-2/+9
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
2019-12-14Auto merge of #67084 - Pagten:feature/print-msg-from-elf-entrypoint, r=Amanieubors-0/+30
SGX: Change ELF entrypoint This fixes [rust-sgx issue #148](https://github.com/fortanix/rust-sgx/issues/148). A new entry point is created for the ELF file generated by `rustc`, separate from the enclave entry point. When the ELF file is executed as a Linux binary, the error message below is written to stderr. > Error: This file is an SGX enclave which cannot be executed as a standard Linux binary. > See the installation guide at https://edp.fortanix.com/docs/installation/guide/ on how to use 'cargo run' or follow the steps at https://edp.fortanix.com/docs/tasks/deployment/ for manual deployment. When the ELF file is converted to an SGXS using `elf2sgxs`, the old entry point is still set as the enclave entry point. In a future pull request in the rust-sgx repository, `elf2sgxs` will be modified to remove the code in the ELF entry point, since this code is not needed in the enclave.
2019-12-14Fix incorrect example code of OpenOptions::openPatrick Wang-1/+1
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-1/+8
functions with a `const` modifier
2019-12-13Reuse the `staged_api` feature for `rustc_const_unstable`Oliver Scherer-1/+1
2019-12-12std: Implement `LineWriter::write_vectored`Alex Crichton-1/+171
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-12Fix signature of `__wasilibc_find_relpath`Alex Crichton-14/+21
Looks like this function changed upstream, so it needs to be adjusted for when used by libstd.
2019-12-12Rollup merge of #67230 - chansuke:remove-irrelevant-passage, r=Dylan-DPCYuki Okushi-2/+0
Remove irelevant comment on `register_dtor` Fixes #66572.
2019-12-11Auto merge of #65345 - ↵bors-1/+0
davidtwco:issue-64130-async-send-sync-error-improvements, r=nikomatsakis async/await: improve not-send errors, part 2 Part of #64130. Fixes #65667. This PR improves the errors introduced in #64895 so that they have specialized messages for `Send` and `Sync`. r? @nikomatsakis
2019-12-12Remove irelevant comment on `register_dtor`chansuke-2/+0
2019-12-11Rollup merge of #67181 - TheSamsa:update-hashmap-doc, r=Dylan-DPCYuki Okushi-1/+1
Update hashmap doc Update hint to the used algorithms. Skimmed over the longer description but could not find another mentioning of the old algorithms. Closes #67093
2019-12-09Update HashMap documentation hint of the used 'quadratic probing' and 'SIMD ↵Christoph Schmidler-1/+1
lookup' algorithms
2019-12-09inline some common methods on OsStrLzu Tao-0/+11
2019-12-08Auto merge of #66730 - hermitcore:master, r=alexcrichtonbors-2/+0
remove dependency from libhermit The build process of the unikernel HermitCore is redesigned and doesn't longer depend on libhermit.
2019-12-08async/await: more improvements to non-send errorsDavid Wood-1/+0
Signed-off-by: David Wood <david@davidtw.co>
2019-12-08Rollup merge of #66325 - BartMassey:master, r=joshtriplettMazdak Farrokhzad-2/+2
Change unused_labels from allow to warn Fixes #66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
2019-12-06Rollup merge of #67094 - RalfJung:fields, r=Mark-SimulacrumMazdak Farrokhzad-26/+24
get rid of __ in field names This old work-around should not be needed any more.
2019-12-06get rid of __ in field namesRalf Jung-26/+24
2019-12-07Rollup merge of #67085 - reitermarkus:addr-parser, r=Mark-SimulacrumYuki Okushi-19/+4
Remove boxed closures in address parser. Simplify address parser by removing unnecessary boxed closures. Also relevant for https://github.com/rust-lang/rfcs/pull/2832.
2019-12-07Rollup merge of #67049 - tmiasko:io-slice-advance, r=rkruppeYuki Okushi-29/+26
Simplify {IoSlice, IoSliceMut}::advance examples and tests Remove unnecessary calls to `std::mem::replace` and make variables immutable.
2019-12-07Rollup merge of #66998 - Wind-River:master_up, r=alexcrichtonYuki Okushi-2/+9
Modified the testcases for VxWorks
2019-12-06Remove boxed closures in address parser.Markus Reiter-19/+4
2019-12-06Rewrite %rax register before syscall because it is overwritten by the ↵Pieter Agten-2/+2
syscall itself
2019-12-06Auto merge of #67080 - JohnTitor:rollup-2t6fm3u, r=JohnTitorbors-9/+26
Rollup of 10 pull requests Successful merges: - #66649 (VxWorks: fix issues in accessing environment variables) - #66764 (Tweak wording of `collect()` on bad target type) - #66900 (Clean up error codes) - #66974 ([CI] fix the `! isCI` check in src/ci/run.sh) - #66979 (Add long error for E0631 and update ui tests.) - #67017 (cleanup long error explanations) - #67021 (Fix docs for formatting delegations) - #67041 (add ExitStatusExt into prelude) - #67065 (Fix fetching arguments on the wasm32-wasi target) - #67066 (Update the revision of wasi-libc used in wasm32-wasi) Failed merges: r? @ghost
2019-12-06Rollup merge of #67065 - alexcrichton:update-wasi, r=sfacklerYuki Okushi-0/+1
Fix fetching arguments on the wasm32-wasi target Fixes an error introduced in #66750 where wasi executables always think they have zero arguments because one of the vectors returned here accidentally thought it was length 0.
2019-12-06Rollup merge of #67041 - Wind-River:master_base, r=alexcrichtonYuki Okushi-0/+3
add ExitStatusExt into prelude r? @alexcrichton
2019-12-06Rollup merge of #66649 - Wind-River:master_xyz, r=alexcrichtonYuki Okushi-9/+22
VxWorks: fix issues in accessing environment variables
2019-12-06Auto merge of #66835 - AviKozokin:master, r=alexcrichtonbors-2/+2
std:win: avoid WSA_FLAG_NO_INHERIT flag and don't use SetHandleInformation on UWP This flag is not supported on Windows 7 before SP1, and on windows server 2008 SP2. This breaks Socket creation & duplication. This was fixed in a previous PR. cc #26658 This PR: cc #60260 reuses this flag to support UWP, and makes an attempt to handle the potential error. This version still fails to create a socket, as the error returned by WSA on this case is WSAEINVAL (invalid argument). and not WSAEPROTOTYPE. MSDN page for WSASocketW (that states the platform support for WSA_FLAG_NO_HANDLE_INHERIT): https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasocketw CC #26543 CC #26518
2019-12-05Fix fetching arguments on the wasm32-wasi targetAlex Crichton-0/+1
Fixes an error introduced in #66750 where wasi executables always think they have zero arguments because one of the vectors returned here accidentally thought it was length 0.
2019-12-05Processed review commentsPieter Agten-7/+17
2019-12-05Simplify {IoSlice, IoSliceMut}::advance examples and testsTomasz Miąsko-29/+26
Remove unnecessary calls to `std::mem::replace` and make variables immutable.