about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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-28Let 'clamp' be invoked without using return value; used in testsKyle Strand-1/+4
2019-08-28Annotate functions taking extra argsKyle Strand-2/+21
2019-08-28Add reason for each 'must_use'Kyle Strand-58/+58
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-24Add 'must_use' to all functions 'fn(float) -> float'Kyle Strand-0/+56
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
2019-08-22Fix for 7e13679.Tomasz Różański-2/+2
2019-08-22Change variables names to be more consistent.Tomasz Różański-16/+16
Changed all instances of `c_str` into `cstr` in the documentation examples. This is also consistent with the module source code.
2019-08-22Make use of existing constants.Tomasz Różański-20/+18
f32::consts::PI / 2.0 -> f32::consts::FRAC_PI_2 f32::consts::PI / 4.0 -> f32::consts::FRAC_PI_4 f64::consts::PI / 2.0 -> f64::consts::FRAC_PI_2 f64::consts::PI / 4.0 -> f64::consts::FRAC_PI_4
2019-08-22Change code formatting for readability.Tomasz Różański-18/+18
2019-08-22Fix punctuation.Tomasz Różański-1/+1
2019-08-22Remove redundant `mut`.Tomasz Różański-1/+1
2019-08-21move cvtnewpavlov-24/+25
2019-08-21fixesnewpavlov-74/+69
2019-08-21update argsnewpavlov-2/+8
2019-08-20Auto merge of #63752 - Centril:rollup-nlxwety, r=Centrilbors-2/+0
Rollup of 4 pull requests Successful merges: - #62497 (Fix double resolving custom libdir) - #63209 (Stabilize `async_await` in Rust 1.39.0) - #63746 (Cherry-pick src/test changes with Centril's changes) - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.) Failed merges: r? @ghost
2019-08-20use new get_argsnewpavlov-3/+5
2019-08-20Merge branch 'master' into wasinewpavlov-2/+2
2019-08-20Rollup merge of #63723 - josephlr:sigemptyset, r=alexcrichtonMazdak Farrokhzad-40/+27
Consolidate sigemptyset workarounds In sys/unix/process, we work around the sigemptyset linking issues on android in two different ways. This change consolidates these workarounds, and avoids duplicating bindings from `libc`.
2019-08-20Rollup merge of #63216 - oconnor663:take_read_to_end, r=sfacklerMazdak Farrokhzad-8/+58
avoid unnecessary reservations in std::io::Take::read_to_end Prevously the `read_to_end` implementation for `std::io::Take` used its own `limit` as a cap on the `reservation_size`. However, that could still result in an over-allocation like this: 1. Call `reader.take(5).read_to_end(&mut vec)`. 2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`. 3. `read` writes 5 bytes. 4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`. 5. `read` writes 0 bytes. 6. The read loop ends with `vec` having length 5 and capacity 10. The reservation of 5 bytes was correct for the read at step 2 but unnecessary for the read at step 4. By that second read, `Take::limit` is 0, but the `read_to_end_with_reservation` loop is still using the same `reservation_size` it started with. Solve this by having `read_to_end_with_reservation` take a closure, which lets it get a fresh `reservation_size` for each read. This is an implementation detail which doesn't affect any public API.
2019-08-20fix C incompatibilitiesnewpavlov-22/+47
2019-08-20Merge branch 'master' into redox_builderArtyom Pavlov-2/+2
2019-08-20Refined implementations of `asinh` and `acosh`Phosphorus15-24/+29
2019-08-20Used `copysign` to avoid unnecessary branches.Phosphorus15-18/+2
2019-08-20Stabilize 'async_await'.Mazdak Farrokhzad-2/+0
2019-08-19Consolidate sigemptyset workaroundsJoe Richey-40/+27
In sys/unix/process, we work around the sigemptyset linking issues on android in two different ways. This change consolidates these workarounds, and avoids duplicating bindings from `libc`.
2019-08-19Rollup merge of #63704 - Wind-River:master, r=CentrilMazdak Farrokhzad-1/+1
Fixed: error: unnecessary trailing semicolon
2019-08-19remove any from cfgsArtyom Pavlov-2/+2
2019-08-19cfg fix 2Artyom Pavlov-1/+2
2019-08-19fix cfgArtyom Pavlov-11/+9
2019-08-19std: Update `backtrace` crate dependencyAlex Crichton-1/+1
This commit updates the `backtrace` crate from 0.3.34 to 0.3.35. The [included set of changes][changes] for this update mostly includes some gimli-related improvements (not relevant for the standard library) but critically includes a fix for rust-lang/backtrace-rs#230. The standard library will not aqcuire a session-local lock whenever a backtrace is generated on Windows to allow external synchronization with the `backtrace` crate itself, allowing `backtrace` to be safely used while other threads may be panicking. [changes]: https://github.com/rust-lang/backtrace-rs/compare/0.3.34...0.3.35