Commit graph

314392 commits

Author SHA1 Message Date
Ralf Jung
2db68ef068
Merge pull request #4799 from RalfJung/android
android: get the entire test suite to pass
2026-01-02 18:49:43 +00:00
Ralf Jung
296ab7c15c android: get the entire test suite to pass 2026-01-02 19:21:36 +01:00
Ralf Jung
e8112276a2
Merge pull request #4798 from RalfJung/native-lib-uniform-ret
native lib support: support returning structs
2026-01-02 17:45:58 +00:00
Ralf Jung
4d2ce7d36b use a single generic codepath for all return types 2026-01-02 18:19:33 +01:00
Ralf Jung
604cf92cd4 avoid aliasing trouble around libffi closures 2026-01-02 12:57:41 +01:00
Ralf Jung
1f32c2a418 bump libffi 2026-01-02 12:57:41 +01:00
Ralf Jung
6feaf1dd16
Merge pull request #4728 from weiznich/ffi_callbacks
Basic support for FFI callbacks (at least stop segfaulting and report a proper error)
2026-01-02 11:15:18 +00:00
Ralf Jung
c7f6d7800d minor cleanup 2026-01-02 11:51:10 +01:00
Georg Semmler
9f1066b1c1 Basic support for FFI callbacks
This commit adds basic support for FFI callbacks by registering a shim function
via libffi. This shim function currently only exits with an error. The main
motivation for this is to prevent miri segfaulting as described in
[4639](https://github.com/rust-lang/miri/issues/4639).

In the future miri could try to continue execution in the registered
callback, although as far as I understand Ralf that is no easy problem.
2026-01-02 11:50:40 +01:00
Ralf Jung
e4a86753b2
Merge pull request #4776 from folkertdev/vpdpbusd
add `vpdpbusd` avx512 intrinsic
2026-01-02 09:38:15 +00:00
Folkert de Vries
6453a17534
add vpdpbusd avx512 intrinsic 2026-01-01 14:37:42 +01:00
Ralf Jung
facf7adc35
Merge pull request #4797 from RalfJung/apple-det
fix non-determinism in os_unfair_lock test
2025-12-31 10:15:36 +00:00
Ralf Jung
4ba9b739a4 fix non-determinism in os_unfair_lock test 2025-12-31 10:51:58 +01:00
Ralf Jung
a2a812e76c
Merge pull request #4749 from RalfJung/backtraces
improve backtrace rendering
2025-12-30 19:40:59 +00:00
Ralf Jung
58715c3cce make backtrace look a lot like panics 2025-12-30 20:14:26 +01:00
Ralf Jung
b12b766cf3 fix previously dead android tests and remove some dangling files 2025-12-29 23:37:09 +01:00
Ralf Jung
1514495151 always show the origin_span of the failing thread 2025-12-29 23:37:09 +01:00
Ralf Jung
8cd16cd18b adjust how backtraces get rendered; always show thread name when there are multiple threads 2025-12-29 23:14:39 +01:00
Ralf Jung
d1c8e9342c
Merge pull request #4796 from RalfJung/data-race-ice
fix ICE for particular data race situations
2025-12-29 12:23:47 +00:00
Ralf Jung
a6c2e50e82 fix ICE for particular data race situations 2025-12-29 12:58:15 +01:00
Ben Kimock
e7e90dc5ba
Merge pull request #4795 from rust-lang/rustup-2025-12-29
Automatic Rustup
2025-12-29 09:07:19 +00:00
The Miri Cronjob Bot
00af23f7aa Merge ref '7fefa09b90' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 7fefa09b90
Filtered ref: 22e92bfe253dbac1f2e9f2501509aa94af530cb1
Upstream diff: 23d01cd241...7fefa09b90

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-29 05:12:45 +00:00
The Miri Cronjob Bot
2d35541eb5 Prepare for merging from rust-lang/rust
This updates the rust-version file to 7fefa09b90.
2025-12-29 05:04:35 +00:00
bors
7fefa09b90 Auto merge of #150469 - JonathanBrouwer:rollup-6ujkn6v, r=JonathanBrouwer
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#148321 (parser/lexer: bump to Unicode 17, use faster unicode-ident)
 - rust-lang/rust#149540 (std: sys: fs: uefi: Implement readdir)
 - rust-lang/rust#149582 (Implement `Duration::div_duration_{floor,ceil}`)
 - rust-lang/rust#149663 (Optimized implementation for uN::{gather,scatter}_bits)
 - rust-lang/rust#149667 (Fix ICE by rejecting const blocks in patterns during AST lowering (closes rust-lang/rust#148138))
 - rust-lang/rust#149947 (add several older crashtests)
 - rust-lang/rust#150011 (Add more `unbounded_sh[lr]` examples)
 - rust-lang/rust#150411 (refactor `destructure_const`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-28 22:46:58 +00:00
Jonathan Brouwer
1117bd9e78
Rollup merge of #150411 - Kivooeo:somefunnystuff, r=BoxyUwU
refactor `destructure_const`

r? BoxyUwU

as you suggested yesterday (will add more context like links when it stops being a draft)

tried to split this into some meaningful commits hope it help ^^
2025-12-28 22:52:33 +01:00
Jonathan Brouwer
13633c5bdc
Rollup merge of #150011 - scottmcm:more-unbounded-shift-docs, r=Mark-Simulacrum
Add more `unbounded_sh[lr]` examples

Inspired by rust-lang/rust#149837, which added more stuff to `wrapping_sh[lr]`, including a cross-reference to these methods.
2025-12-28 22:52:33 +01:00
Jonathan Brouwer
32e848163c
Rollup merge of #149947 - cyrgani:crashtests, r=Mark-Simulacrum
add several older crashtests

Includes rust-lang/rust#114880, rust-lang/rust#119940, rust-lang/rust#138274, rust-lang/rust#138660.
Since their issue numbers are all smaller than 140000, this has no conflicts with rust-lang/rust#147857.
2025-12-28 22:52:32 +01:00
Jonathan Brouwer
ef835a83ee
Rollup merge of #149667 - Shinonn23:fix-ice-constblock-148138, r=dianne
Fix ICE by rejecting const blocks in patterns during AST lowering (closes #148138)

This PR fixes the ICE reported in rust-lang/rust#148138.

The root cause is that `const` blocks aren’t allowed in pattern position, but the AST lowering logic still attempted to create `PatExprKind::ConstBlock`, allowing invalid HIR to reach type checking and trigger a `span_bug!`.

Following the discussion in the issue, this patch removes the `ConstBlock` lowering path from `lower_expr_within_pat`. Any `ExprKind::ConstBlock` inside a pattern is now handled consistently with other invalid pattern expressions.

A new UI test is included to ensure the compiler reports a proper error and to prevent regressions.

Closes rust-lang/rust#148138.
2025-12-28 22:52:31 +01:00
Jonathan Brouwer
8bd4d04cce
Rollup merge of #149663 - quaternic:gather-scatter-bits-opt, r=Mark-Simulacrum
Optimized implementation for uN::{gather,scatter}_bits

Feature gate: #![feature(uint_gather_scatter_bits)]
Tracking issue: https://github.com/rust-lang/rust/issues/149069
Accepted ACP: https://github.com/rust-lang/libs-team/issues/695

Implements the methods using the parallel suffix strategy mentioned in the ACP discussion. The referenced source material provides C implementations, though this PR makes improvements over those, cutting the instruction count by a third:
https://rust.godbolt.org/z/rn5naYnK4 (this PR)
https://c.godbolt.org/z/WzYd5WbsY (Hacker's delight)

This was initially based on the code for `gather_bits` that ``@okaneco`` provided in https://github.com/rust-lang/libs-team/issues/695#issuecomment-3538922128 . I wanted to understand how it worked, and later on noticed some opportunities for improvement, which eventually led to this PR.
2025-12-28 22:52:31 +01:00
Jonathan Brouwer
7b105b21d1
Rollup merge of #149582 - max-heller:duration-integer-division, r=Mark-Simulacrum
Implement `Duration::div_duration_{floor,ceil}`
2025-12-28 22:52:30 +01:00
Jonathan Brouwer
b512fa78e9
Rollup merge of #149540 - Ayush1325:uefi-fs-readdir, r=Mark-Simulacrum
std: sys: fs: uefi: Implement readdir

- Tested on OVMF.
- Add path field to uefi file since this will also be required in
  implementing Debug for rust File.

``@rustbot`` label +O-UEFI
2025-12-28 22:52:30 +01:00
Jonathan Brouwer
30618bb89c
Rollup merge of #148321 - Marcondiro:master, r=Mark-Simulacrum
parser/lexer: bump to Unicode 17, use faster unicode-ident

Hello,

Bump the unicode version used by lexer/parser to 17.0.0 by updating:
- `unicode-normalization` to 0.1.25
- `unicode-properties` to 0.1.4
- `unicode-width` to 0.2.2

and by replacing `unicode-xid` with `unicode-ident` which is also 6 times faster.
I think it might be worth to run the benchmarks to double check.
(`unicode-ident` is already in `src/tools/tidy/src/deps.rs`)

Thanks!
2025-12-28 22:52:29 +01:00
bors
21cf7fb3ff Auto merge of #150463 - JonathanBrouwer:rollup-ietend4, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147499 (Implement round-ties-to-even for Duration Debug for consistency with f64)
 - rust-lang/rust#149447 (Rewrite `String::replace_range`)
 - rust-lang/rust#149469 (Leverage &mut in OnceLock when possible)
 - rust-lang/rust#149921 (Add new source component that includes GPL-licensed source)
 - rust-lang/rust#150460 (fix ManuallyDrop::into_inner aliasing (Miri) issues)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-28 18:23:22 +00:00
Jonathan Brouwer
2ecaa1df2d
Rollup merge of #150460 - RalfJung:miri-manually-drop, r=dtolnay
fix ManuallyDrop::into_inner aliasing (Miri) issues

Fixes https://github.com/rust-lang/miri/issues/4793

r? `@WaffleLapkin`
2025-12-28 18:16:11 +01:00
Jonathan Brouwer
3bbad7f337
Rollup merge of #149921 - Kobzol:src-gpl, r=Mark-Simulacrum
Add new source component that includes GPL-licensed source

To unblock rustup distribution of `cg_gcc` (https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Safe.20rustup.20distribution.20of.20rustc_codegen_gcc/with/560644441).

CC ``@joshtriplett``

r? ``@Mark-Simulacrum``
2025-12-28 18:16:10 +01:00
Jonathan Brouwer
cc68f30960
Rollup merge of #149469 - tisonkun:mut-once, r=Mark-Simulacrum
Leverage &mut in OnceLock when possible

See comments inline.
2025-12-28 18:16:10 +01:00
Jonathan Brouwer
3c7ffa5dd1
Rollup merge of #149447 - theemathas:string-replace_range, r=Mark-Simulacrum
Rewrite `String::replace_range`

This simplifies the code, provides better panic messages, and avoids an integer overflow.
2025-12-28 18:16:09 +01:00
Jonathan Brouwer
2c0daa2301
Rollup merge of #147499 - josh-kaplan:master, r=Mark-Simulacrum
Implement round-ties-to-even for Duration Debug for consistency with f64

## Summary

This PR proposes a fix for rust-lang/rust#103747 implementing IEEE-754 S4.3 roundTiesToEven for Duration Debug implementation.

## Testing

Added new test in `time.rs` for  validating roundTiesToEven behavior in Duration formatting. Reran all debug formatting tests in `time.rs` with `./x test library/coretests --test-args time::debug_formatting`.
2025-12-28 18:16:09 +01:00
Kivooeo
b29cc9860b refactor destructure_const 2025-12-28 16:12:27 +00:00
Ralf Jung
d2290c4253 fix ManuallyDrop::into_inner aliasing (Miri) issues 2025-12-28 16:24:55 +01:00
bors
9f54abeeba Auto merge of #150076 - heathdutton:fix-linked-list-cursor-pop-front-index, r=Mark-Simulacrum
Fix `LinkedList::CursorMut::pop_front` to correctly update index

When `pop_front` was called while the cursor pointed to the front element, `move_next` incremented the index but it was never decremented afterwards, causing the index to incorrectly report 1 instead of 0.

Always decrement the index after popping from front using `saturating_sub` to handle edge cases safely.

Fixes rust-lang/rust#147616
2025-12-28 15:10:14 +00:00
bors
7eadf834b5 Auto merge of #150456 - dianqk:codegen-llvm-serde, r=mati865
Removes the serde dependency in rustc_codegen_llvm
2025-12-28 10:24:30 +00:00
Oli Scherer
2fdaee2d13
Merge pull request #4794 from rust-lang/rustup-2025-12-28
Automatic Rustup
2025-12-28 08:08:46 +00:00
dianqk
fe075ad212
Removes the serde dependency in rustc_codegen_llvm 2025-12-28 15:52:20 +08:00
The Miri Cronjob Bot
97af316376 Merge ref '23d01cd241' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 23d01cd241
Filtered ref: 8d207a46df39a5e19eeff773b2bed64e5ca8c44d
Upstream diff: 38ed7700e7...23d01cd241

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-28 05:09:22 +00:00
The Miri Cronjob Bot
4e2ad8a12a Prepare for merging from rust-lang/rust
This updates the rust-version file to 23d01cd241.
2025-12-28 05:02:03 +00:00
bors
23d01cd241 Auto merge of #150448 - matthiaskrgr:rollup-d52y317, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#148533 (Split LLVM intrinsic abi handling from the rest of the abi handling)
 - rust-lang/rust#150358 (fix rustfmt on `const impl Ty {}`)
 - rust-lang/rust#150434 (Add test for never type fallback in try blocks with `Into<!>`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-27 22:44:07 +00:00
Matthias Krüger
05287d1e81
Rollup merge of #150434 - AprilNEA:test-125364-never-type-try-blocks, r=WaffleLapkin
Add test for never type fallback in try blocks with `Into<!>`

### Summary

Adds UI tests for issue rust-lang/rust#125364, which involves the interaction between
never type fallback, try blocks, and `From`/`Into` trait bounds.

### Changes

- Added `tests/ui/never_type/try-block-never-type-fallback.rs`
- Tests both edition 2021 (where the issue manifests) and edition 2024 (where it's fixed)

### Issue

Closes rust-lang/rust#125364

### Testing

```bash
./x test tests/ui/never_type/try-block-never-type-fallback.rs
```

Both test variants pass:

e2021: Correctly fails with expected error
e2024: Compiles successfully (check-pass)

### Notes

This test documents the edition-dependent behavior of never type fallback in try blocks, as requested in the original issue.

cc `@WaffleLapkin`
2025-12-27 22:36:36 +01:00
Matthias Krüger
15b364e2cb
Rollup merge of #150358 - fee1-dead-contrib:push-utvysrrzsvvm, r=oli-obk
fix rustfmt on `const impl Ty {}`

r? `@oli-obk` on rust-lang/rust#148434, cc `@ytmimi` for https://github.com/rust-lang/rust/pull/148434/changes#r2637972310

format_constness_right outputs `" const"` whereas format_constness outputs `"const "`

Not making this change to rust-lang/rustfmt since I'm not sure if that repo has these changes yet.
2025-12-27 22:36:35 +01:00
Matthias Krüger
1a6c604a39
Rollup merge of #148533 - bjorn3:split_llvm_intrinsic_abi_handling, r=WaffleLapkin
Split LLVM intrinsic abi handling from the rest of the abi handling

LLVM intrinsics have weird requirements like requiring the fake "unadjusted" abi, not being callable through function pointers and for all codegen backends other than cg_llvm requiring special cases to redirect them to the correct backend specific intrinsic (or directly codegen their implementation inline without any intrinsic call). By splitting the LLVM intrinsic handling it becomes easier for backends to special case them and should in the future allow getting rid of the abi calculation for `extern "unadjusted"` in favor of computing the correct abi directly in the backend without depending on the exact way cg_ssa lowers types.
2025-12-27 22:36:35 +01:00