| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Failed with
called `Result::unwrap()` on an `Err` value: ynf
Caused by:
0:
input: (223, 116.89665)
as hex: (, 0x1.d3962cp+6)
as bits: (0x000000df, 0x42e9cb16)
expected: -3.1836905e38 -0x1.df074cp+127 0xff6f83a6
actual: -inf -inf 0xff800000
1: mismatched infinities
|
|
These functions represent new operations from IEEE 754-2019. Introduce
them for all float sizes.
|
|
These don't have much content since they now use the generic
implementation. There will be more similar functions in the near future
(fminimum, fmaximum, fminimum_num, fmaximum_num); start the pattern of
combining similar functions now so we don't have to eventually maintain
similar docs across 24 different files.
|
|
Print errors immediately rather than deferring to the end, so any debug
output shows up immediately before the relevant failed test.
|
|
Rollup of 6 pull requests
Successful merges:
- #136419 (adding autodiff tests)
- #136628 (ci: upgrade to crosstool-ng 1.27.0)
- #136681 (resolve `llvm-config` path properly on cross builds)
- #136714 (Update `compiler-builtins` to 0.1.146)
- #136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync")
- #136791 (Disable DWARF in linker options for i686-unknown-uefi)
Failed merges:
- #136767 (improve host/cross target checking)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Update `compiler-builtins` to 0.1.146
Exposes the error function so we can expose this in the standard library [1].
[1]: https://github.com/rust-lang/compiler-builtins/pull/753
|
|
r=workingjubilee
Portable SIMD subtree update
r? `@workingjubilee`
|
|
cc #136756
|
|
|
|
Many routines have some form of handling for rounding mode and floating
point exceptions, which are implemented via a combination of stubs and
`force_eval!` use. This is suboptimal, however, because:
1. Rust does not interact with the floating point environment, so most
of this code does nothing.
2. The parts of the code that are not dead are not testable.
3. `force_eval!` blocks optimizations, which is unnecessary because we
do not rely on its side effects.
We cannot ensure correct rounding and exception handling in all cases
without some form of arithmetic operations that are aware of this
behavior. However, the cases where rounding mode is explicitly handled
or exceptions are explicitly raised are testable. Make this possible
here for functions that depend on `math::fenv` by moving the
implementation to a nonpublic function that takes a `Round` and returns
a `Status`.
Link: https://github.com/rust-lang/libm/issues/480
|
|
|
|
|
|
ignore win_delete_self test in Miri
Follow-up to https://github.com/rust-lang/rust/pull/134679, fixes miri-test-libstd on Windows
Cc `@ChrisDenton` `@Mark-Simulacrum`
|
|
Some miscellaneous edition-related library tweaks
Some library edition tweaks that can be done separately from upgrading the whole standard library to edition 2024 (which is blocked on getting the submodules upgraded, for example)
|
|
Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value
Sometimes we store an invalid handle when we don't want to return an error. We then check the handle before use in order to avoid actually using the invalid handle. However, using an `Option` for this is better and avoids us forgetting to check the handle is valid. This was noticed due to us closing the handle without checking for validity: https://github.com/rust-lang/rust/blob/bd6a6777f5cbbec549f123995026cef76d1e6b84/library/std/src/sys/pal/windows/fs.rs#L148-L151
|
|
fix(libtest): Enable Instant on Emscripten targets
`Instant::now()` works correctly on Emscripten since https://github.com/rust-lang/libc/pull/3962. All wasm-family targets with OS support can now handle instants.
Improves #131738.
~~This changes the behavior of libtest on `unknown-unknown`/`unknown-none` wasm targets, but as far as I can see, libtest doesn't support them anyway. (Can anyone double-check?)~~ UPD: this patch no longer affects `unknown-unknown` targets.
``@rustbot`` label +A-libtest +T-testing-devex +O-emscripten +O-wasm -needs-triage
|
|
Simplify Rc::as_ptr docs + typo fix
|
|
|
|
|
|
This produces better assembly, e.g. on aarch64:
.globl libm::u128_wmul
.p2align 2
libm::u128_wmul:
Lfunc_begin124:
.cfi_startproc
mul x9, x2, x0
umulh x10, x2, x0
umulh x11, x3, x0
mul x12, x3, x0
umulh x13, x2, x1
mul x14, x2, x1
umulh x15, x3, x1
mul x16, x3, x1
adds x10, x10, x14
cinc x13, x13, hs
adds x13, x13, x16
cinc x14, x15, hs
adds x10, x10, x12
cinc x11, x11, hs
adds x11, x13, x11
stp x9, x10, [x8]
cinc x9, x14, hs
stp x11, x9, [x8, rust-lang/libm#16]
ret
The original was ~70 instructions so the improvement is significant.
With these changes, the result is reasonably close to what LLVM
generates using `u256` operands [1].
[1]: https://llvm.godbolt.org/z/re1aGdaqY
|
|
Pin i686-pc-windows-gnu to nightly-2025-02-07 until [1] is resolved.
[1]: https://github.com/rust-lang/rust/issues/136795
|
|
These still fail random tests, e.g.:
called `Result::unwrap()` on an `Err` value: jn
Caused by:
0:
input: (1068, -16013.98381387313)
as hex: (, -0x1.f46fded9ced39p+13)
as bits: (0x0000042c, 0xc0cf46fded9ced39)
expected: 6.7603314308122506e-6 0x1.c5ad9c102d413p-18 0x3edc5ad9c102d413
actual: 6.7603314308006335e-6 0x1.c5ad9c1029e80p-18 0x3edc5ad9c1029e80
1: ulp 13715 > 4000
Caused by:
0:
input: (195, 42147.94)
as hex: (, 0x1.4947e2p+15)
as bits: (0x000000c3, 0x4724a3f1)
expected: -2.13669e-7 -0x1.cad9c6p-23 0xb4656ce3
actual: -2.1376937e-7 -0x1.cb10f4p-23 0xb465887a
1: ulp 7063 > 4000
Caused by:
0:
input: (194, 740.1916)
as hex: (, 0x1.721886p+9)
as bits: (0x000000c2, 0x44390c43)
expected: 1.212096e-6 0x1.455e9ap-20 0x35a2af4d
actual: 1.2172386e-6 0x1.46c000p-20 0x35a36000
1: ulp 45235 > 10000
Increase allowed precision to avoid spurious failures.
|
|
|
|
This will ignore certain commits in `git blame`
|
|
|
|
`Instant::now()` works correctly on Emscripten since
https://github.com/rust-lang/libc/pull/3962. All wasm-family targets
with OS support can now handle instants.
|
|
|
|
|
|
For the documentation side, we probably want to show the Rust 2024
style.
|
|
Because stdarch has a really large number of unsafe functions with
single-line calls, `unsafe_op_in_unsafe_fn` would end up adding a lot of
noise, so for now we will allow it to migrate to 2024.
|
|
|
|
Stabilize `vec_pop_if`
Tracking issue: #122741
FCP completed in https://github.com/rust-lang/rust/issues/122741#issuecomment-2605116387
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update bootstrap compiler and rustfmt
The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same
time.
|
|
Rollup of 5 pull requests
Successful merges:
- #134679 (Windows: remove readonly files)
- #136213 (Allow Rust to use a number of libc filesystem calls)
- #136530 (Implement `x perf` directly in bootstrap)
- #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull)
- #136659 (Pick the max DWARF version when LTO'ing modules with different versions )
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`
Address the issue #136723 on nightly (the issue will only *actually* be fixed with a beta backport).
|
|
Document `Sum::sum` returns additive identities for `[]`
Because the neutral element of `<fNN as iter::Sum>` was changed to `neg_zero`, the documentation needed to be updated, as it was reporting inadequate information about what should be expected from the return.
Relevant Commit: https://github.com/rust-lang/rust/commit/490818851860fb257e23fe7aa0ee32eaffc4ba40
Relevant Pull Request: https://github.com/rust-lang/rust/pull/129321
---
The referenced commit causes unintended side effects on presentation layer applications like using Tera templates, for example. I'm not sure what the motivation was behind the original change, but it seems like more discussion should be put into this issue and potentially have that change reverted.
|
|
Clean up `HashMap` and `HashSet` docs.
This commit makes some small, pedantic changes to the docs for `HashMap` and `HashSet`, which fixes that:
* "HashMap" is not always formatted as code (as in `HashMap`), and that
* `HashSet` sometimes references `HashMap` instead of itself.
|
|
Detect (non-raw) borrows of null ZST pointers in CheckNull
Fixes #136568. Ensures that we check that borrows of derefs are non-null in the `CheckNull` pass **even if** it's a ZST pointee.
I'm actually surprised that this is UB in Miri, but if it's certainly UB, then this PR modifies the null check to be stricter. I couldn't find anywhere in https://doc.rust-lang.org/reference/behavior-considered-undefined.html that discusses this case specifically, but I didn't read it too closely, or perhaps it's just missing a bullet point.
On the contrary, if this is actually erroneous UB in Miri, then I'm happy to close this (and perhaps fix the null check in Miri to exclude ZSTs?)
On the double contrary, if this is still an "open question", I'm also happy to close this and wait for a decision to be made.
r? ``@saethlin`` cc ``@RalfJung`` (perhaps you feel strongly about this change)
|