about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-09-06Rollup merge of #64198 - cramertj:fuchsia-monotonic, r=alexcrichtonMazdak Farrokhzad-0/+1
Add Fuchsia to actually_monotonic Fuchsia provides a fully monotonic clock. Fix https://github.com/rust-lang/rust/issues/64196 cc @joshlf @tmandry r? @alexcrichton
2019-09-06Rollup merge of #64186 - alexcrichton:improve-env-codegen, r=sfacklerMazdak Farrokhzad-70/+56
std: Improve downstream codegen in `Command::env` This commit rejiggers the generics used in the implementation of `Command::env` with the purpose of reducing the amount of codegen that needs to happen in consumer crates, instead preferring to generate code into libstd. This was found when profiling the compile times of the `cc` crate where the binary rlib produced had a lot of `BTreeMap` code compiled into it but the crate doesn't actually use `BTreeMap`. It turns out that `Command::env` is generic enough to codegen the entire implementation in calling crates, but in this case there's no performance concern so it's fine to compile the code into the standard library. This change is done by removing the generic on the `CommandEnv` map which is intended to handle case-insensitive variables on Windows. Instead now a generic isn't used but rather a `use` statement defined per-platform is used. With this commit a debug build of `Command::new("foo").env("a", "b")` drops from 21k lines of LLVM IR to 10k.
2019-09-06Rollup merge of #63676 - newpavlov:wasi, r=alexcrichtonMazdak Farrokhzad-434/+326
Use wasi crate for Core API Blocked by: CraneStation/rust-wasi#5 Blocks: rust-lang/libc#1461 cc @sunfishcode @alexcrichton
2019-09-05Merge pull request #17 from rust-lang/masterBaoshan-25/+42
sync with rust-lang/rust master branch
2019-09-05Add Fuchsia to actually_monotonicTaylor Cramer-0/+1
Fuchsia provides a fully monotonic clock.
2019-09-05std: Improve downstream codegen in `Command::env`Alex Crichton-70/+56
This commit rejiggers the generics used in the implementation of `Command::env` with the purpose of reducing the amount of codegen that needs to happen in consumer crates, instead preferring to generate code into libstd. This was found when profiling the compile times of the `cc` crate where the binary rlib produced had a lot of `BTreeMap` code compiled into it but the crate doesn't actually use `BTreeMap`. It turns out that `Command::env` is generic enough to codegen the entire implementation in calling crates, but in this case there's no performance concern so it's fine to compile the code into the standard library. This change is done by removing the generic on the `CommandEnv` map which is intended to handle case-insensitive variables on Windows. Instead now a generic isn't used but rather a `use` statement defined per-platform is used. With this commit a debug build of `Command::new("foo").env("a", "b")` drops from 21k lines of LLVM IR to 10k.
2019-09-05Rollup merge of #64030 - jethrogb:jb/sgx-sync-issues, r=alexcrichtonMazdak Farrokhzad-20/+32
Fix unlock ordering in SGX synchronization primitives Avoid holding spinlocks during usercalls. This should avoid deadlocks in certain pathological scheduling cases. cc @mzohreva @parthsane r? @alexcrichton
2019-09-05Rollup merge of #64123 - ↵Mazdak Farrokhzad-0/+8
danielhenrymantilla:add_comment_about_uninit_integers, r=Centril Added warning around code with reference to uninit bytes Officially, uninitialized integers, and therefore, Rust references to them are _invalid_ (note that this may evolve into official defined behavior (_c.f._, https://github.com/rust-lang/unsafe-code-guidelines/issues/71)). However, `::std` uses references to uninitialized integers when working with the `Read::initializer` feature (#42788), since it relies on this unstably having defined behavior with the current implementation of the compiler (IIUC). Hence the comment to disincentivize people from using this pattern outside the standard library.
2019-09-05Rollup merge of #62860 - vi:stabilize_checked_duration_since, r=Mark-SimulacrumMazdak Farrokhzad-5/+2
Stabilize checked_duration_since for 1.38.0 Looks like it has already found some use in projects. Resolves #58402.
2019-09-04Use backtrace formatting from the backtrace crateTaylor Cramer-151/+94
2019-09-05Stabilize checked_duration_since for 1.39.0Vitaly _Vi Shukela-5/+2
Resolves #58402.
2019-09-03Merge pull request #12 from rust-lang/masterBaoshan-715/+156
sync with rust-lang/rust branch master
2019-09-03make wasi a target-specific dependencyArtyom Pavlov-1/+3
2019-09-03Changed comment to better reflect std's exceptional situationDaniel Henry-Mantilla-4/+4
2019-09-03Added warning around code with reference to uninit bytesDaniel Henry-Mantilla-0/+8
2019-09-01vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass ↵Baoshan Pang-3/+7
initial stack size to rtpSpawn
2019-09-01Rollup merge of #64039 - pickfire:patch-1, r=jonas-schievinkMazdak Farrokhzad-2/+2
Update sync condvar doc style
2019-09-01Rollup merge of #63410 - johnterickson:master, r=joshtriplettMazdak Farrokhzad-22/+24
Update BufWriter example to include call to flush() I was playing with a writing a Huffman encoder/decoder and was getting weird corruptions and truncations. I finally realized it was was because `BufWriter` was swallowing write errors 😬. I've found Rust to generally be explicit and err on the safe side, so I definitely found this unintuitive and not "rustic". https://twitter.com/johnterickson/status/1159514988123312128
2019-08-31Auto merge of #64025 - Wind-River:master_003, r=alexcrichtonbors-324/+0
remove directory libstd/sys/vxworks/backtrace which is not used any more r? @alexcrichton cc @n-salim
2019-08-31Update sync condvar doc styleIvan Tham-2/+2
2019-08-31clarify that not all errors are observedJohn Erickson-2/+3
2019-08-31Add in generic type to description of BufReader and BufWriterJohn Erickson-17/+17
2019-08-31Update BufWriter example to include call to flush()John Erickson-6/+7
2019-08-30Fix unlock ordering in SGX synchronization primitivesJethro Beekman-20/+32
2019-08-30fuchsia: Fix default environment behavior when spawningTyler Mandry-2/+5
2019-08-30fuchsia: Don't fail to spawn if no stdin existsTyler Mandry-22/+41
2019-08-30Rollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomezMazdak Farrokhzad-3/+4
Match the loop examples The idea is to show the usefulness of the expression side by side.
2019-08-30remove directory libstd/sys/vxworks/backtrace which is not used any moreBaoshan Pang-324/+0
2019-08-30Don't try to use /dev/null on FuchsiaTyler Mandry-9/+36
2019-08-30simplify codenewpavlov-5/+12
2019-08-29Update zx_time_t to an i64Tyler Mandry-3/+3
2019-08-29update to wasi v0.7newpavlov-53/+68
2019-08-29Rollup merge of #63979 - alexcrichton:remove-wasm-syscall, r=dtolnayMazdak Farrokhzad-251/+18
std: Remove the `wasm_syscall` feature This commit removes the `wasm_syscall` feature from the wasm32-unknown-unknown build of the standard library. This feature was originally intended to allow an opt-in way to interact with the operating system in a posix-like way but it was never stabilized. Nowadays with the advent of the `wasm32-wasi` target that should entirely replace the intentions of the `wasm_syscall` feature.
2019-08-29Rollup merge of #63963 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-25/+2
remove the reference to __cxa_thread_atexit_impl r? @alexcrichton cc @n-salim
2019-08-28std: Remove the `wasm_syscall` featureAlex Crichton-251/+18
This commit removes the `wasm_syscall` feature from the wasm32-unknown-unknown build of the standard library. This feature was originally intended to allow an opt-in way to interact with the operating system in a posix-like way but it was never stabilized. Nowadays with the advent of the `wasm32-wasi` target that should entirely replace the intentions of the `wasm_syscall` feature.
2019-08-27remove the reference to __cxa_thread_atexit_implBaoshan Pang-25/+2
2019-08-27Rollup merge of #63698 - Phosphorus15:master, r=nagisaMazdak Farrokhzad-19/+24
Fixed floating point issue with asinh function This should fixes #63271 , in which `asinh(-0.0)` returns `0.0` instead of `-0.0`. according to @nagisa > > > IEEE-754 (2008), section 9.2.1: > > > For the functions expm1, exp2m1, exp10m1, logp1, log2p1, log10p1, sin, tan, sinPi, atanPi, asin, atan, sinh, tanh, asinh, and atanh, f(+0) is +0 and f(−0) is −0 with no exception. > > and > > > sinh(±∞) and asinh(±∞) are ±∞ with no exception. After ensuring that the function `asinh` is the only function affected (functions like `sin`, `sinh` are all based on `cmath` library or `llvm` intrinsics), and that `atanh` always gives the correct result. The only function to modify is `asinh`.
2019-08-26Rollup merge of #63836 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-1/+1
VxWorks does not provide a way to set the task name except at creation time Make set_name do thing as VxWorks does not provide a way to set the task name except at creation time. r? @alexcrichton cc @n-salim
2019-08-26Update src/libstd/time.rsChristian Veenman-1/+3
Co-Authored-By: lzutao <taolzu@gmail.com>
2019-08-26Comment out println in read_dir sorting exampleAli Raheem-5/+5
2019-08-24Merge branch 'master' into wasiArtyom Pavlov-118/+167
2019-08-25Document platform-specific behavior of the iterator returned by ↵Marcin Mielniczuk-1/+2
std::fs::read_dir
2019-08-24Added table containing the system calls used by Instant and SystemTime.Christian-0/+30
2019-08-23Auto merge of #63814 - malbarbo:wasi-error-kind, r=alexcrichtonbors-2/+18
Implement decode_error_kind for wasi Based on the implementation for unix targets,
2019-08-23VxWorks does not provide a way to set the task name except at creation timeBaoshan Pang-1/+1
2019-08-23Implement decode_error_kind for wasiMarco A L Barbosa-2/+18
Based on the implementation for unix targets
2019-08-23Auto merge of #63815 - sebastinez:sebastinez-doc-#63792, r=jonas-schievinkbors-1/+1
Update occurences of as_slice to as_str in comments Fix #63792
2019-08-23Auto merge of #63521 - newpavlov:redox_builder, r=pietroalbinibors-13/+12
Re-enable Redox builder (take 2) Closes: #63160
2019-08-22VxWorks ignores the SO_SNDTIMEO socket option (this is long-standingSalim Nasser-2/+4
behavior), so skip the following tests: net::tcp::tests::timeouts net::udp::tests::timeouts
2019-08-22Update occurences of as_sliceSebastian Martinez-1/+1
Update occurences of as_slice to as_str