about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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-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-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-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-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-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
2019-08-19test cases for both `f32` and `f64` on asinh(-0.0)Phosphorus15-0/+2
2019-08-19Added negative cases for `asinh` according to IEEE-754.Phosphorus15-8/+22
2019-08-17Fixed: error: unnecessary trailing semicolonSalim Nasser-1/+1
2019-08-16Rollup merge of #63613 - petrochenkov:stdhyg, r=alexcrichtonMazdak Farrokhzad-13/+10
Hygienize use of built-in macros in the standard library Same as https://github.com/rust-lang/rust/pull/61629, but for built-in macros. Closes https://github.com/rust-lang/rust/issues/48781 r? @alexcrichton
2019-08-16Add the Layout of the failed allocation to TryReserveError::AllocErrorSimon Sapin-2/+6
… and add a separately-unstable field to force non-exhaustive matching (`#[non_exhaustive]` is no implemented yet on enum variants) so that we have the option to later expose the allocator’s error value. CC https://github.com/rust-lang/wg-allocators/issues/23
2019-08-16Update hashbrown to 0.5.0Simon Sapin-2/+2
2019-08-16Rename CollectionAllocError to TryReserveErrorSimon Sapin-9/+9
2019-08-15Remove `__rust_unstable_column`Vadim Petrochenkov-4/+1
2019-08-15Hygienize use of built-in macros in the standard libraryVadim Petrochenkov-9/+9
2019-08-15Rollup merge of #63546 - lzutao:clouldabi-maybeuninit, r=RalfJungMazdak Farrokhzad-14/+18
Remove uses of `mem::uninitialized()` from cloudabi This PR removes uses of `mem::uninitialized` from `cloudabi` module, excluding the layout test in `src/libstd/sys/cloudabi/abi/cloudabi.rs`. r? @RalfJung cc @EdSchouten cc #62397
2019-08-15Rollup merge of #63155 - mfkl:uwp-msvc, r=alexcrichtonMazdak Farrokhzad-2/+2
Add UWP MSVC targets Hi, - The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though. - This https://github.com/rust-lang/rust/commit/5e6619edd1a3b5c3f85438166d4d32af49f800fd fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI. - Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only. - I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
2019-08-15Remove uses of `mem::uninitialized()` from cloudabiLzu Tao-14/+18
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-55/+19
2019-08-12Rollup merge of #63480 - OptimisticPeach:patch-1, r=CentrilMazdak Farrokhzad-1/+1
Fixes #63477 Adds a closing parenthesis.
2019-08-12Rollup merge of #63461 - tommilligan:doc-var-panic, r=joshtriplettMazdak Farrokhzad-0/+12
docs: add stdlib env::var(_os) panic Closes #63456
2019-08-12Fixes #63477OptimisticPeach-1/+1
Adds a closing parenthesis.
2019-08-11Rollup merge of #61969 - MikailBag:master, r=CentrilMark Rousskov-0/+30
Add #[repr(transparent)] for several types In some functions, types mentioned in this PR are transmuted into their inner value. Example for `PathBuf`: https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1132. This PR adds `#[repr(transparent)]` to those types, so their correct behavior doesn't depend on compiler details. (As far as I understand, currently that line, converting `PathBuf` to `Vec<u8>`, is UB).
2019-08-11docs: add stdlib env::var(_os) panicTom Milligan-0/+12
2019-08-10Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=CentrilMazdak Farrokhzad-2/+11
Use associated_type_bounds where applicable - closes #61738
2019-08-10Give built-in macros stable addresses in the standard libraryVadim Petrochenkov-21/+30
2019-08-09Add FIXME-s that some types should be transparentMikail Bagishov-0/+30
2019-08-09Add missing #![feature(associated_type_bounds)]Ilija Tovilo-0/+1
2019-08-09Postpone deprecating try! until 1.39.0Lzu Tao-1/+2