Skip to content

Rollup of 10 pull requests - #161719

Merged
rust-bors[bot] merged 29 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-0WnGqt6
Aug 25, 2026
Merged

Rollup of 10 pull requests#161719
rust-bors[bot] merged 29 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-0WnGqt6

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

TDecking and others added 29 commits August 9, 2026 22:54
I wasn't able to find a test that verifies different behavior based on
whether or not overflow checks are available, so add one here.
…ing methods

Newly implemented/adjusted:
- vectored read/write
- file locking
- native paths (bin/tmp)
- command output
- process pid
Change from the existing behavior of panicking unconditionally to
panicking only if debug assertions are enabled, wrapping otherwise. This
is more consistent with other operations, and gives slightly better
codegen [1].

Suggested in the stabilization PR, RUST-161015.

[1]: https://rust.godbolt.org/z/Yz81zhbno
…crum

dirfd dir operations (3/4)

Previous PR: rust-lang#150679
Reference: rust-lang#139514
Tracking issue: rust-lang#120426
library: motor: bump moto-rt ABI ver to 17

Newly added features:

- vectored read/write
- file locking
- native paths (bin/tmp/home)
- command output
- process pid
interpret: fix after_local_read handling

`after_local_read` handling was wrong in two ways:
- Contrary to what was documented, we invoked it for all reads of locals, not just reads of locals that have their values stored as immediates (without memory).
- Miri effectively ignored the `frame` we are passing to it. And indeed we never want this called on anything but the current frame, also for consistency with the corresponding write hook.

So let's restrict `local_to_op` to the current frame.
Debuggers/visualizers should be able to use the existing method on `LocalState` that Miri also needs for its provenance visitor. Its name was not sufficiently scary for skipping access hooks, so I also overhauled how we name these "fake"/"ghost" access related APIs.
Update books

## rust-lang/reference

3 commits in eda708334abad285d63bc1f3558a51e8b790346e..3b38834b39f732c64686f7c64aa29dcf3cd83ba5
2026-08-18 23:36:42 UTC to 2026-08-18 21:58:44 UTC

- Tolerate malformed comments in shebang lookahead (rust-lang/reference#2331)
- Fix some lexer rules (rust-lang/reference#2330)
- Add grammar validation tool (rust-lang/reference#2325)
Rework `div_ceil` for nonzero integers

This changes the definition of `NonZero::div_ceil` for improved performance by employing a different algorithm.
The generated assembly is better in nearly every case, with the exception of the division by a constant 2, which gains one instruction.

<details>

<summary>Assembly</summary>

```asm
div_ceil_16_new:
        lea     rax, [rdi - 1]
        shr     rax, 4
        inc     rax
        ret

div_ceil_16_old:
        mov     rax, rdi
        shr     rax, 4
        and     edi, 15
        cmp     rdi, 1
        sbb     rax, -1
        ret

div_ceil_21_new:
        lea     rcx, [rdi - 1]
        movabs  rdx, -8784163844623596007
        mov     rax, rcx
        mul     rdx
        sub     rcx, rdx
        shr     rcx
        add     rcx, rdx
        shr     rcx, 4
        inc     rcx
        mov     rax, rcx
        ret

div_ceil_21_old:
        movabs  rcx, -8784163844623596007
        mov     rax, rdi
        mul     rcx
        movabs  rcx, -3513665537849438403
        imul    rcx, rdi
        sub     rdi, rdx
        shr     rdi
        add     rdi, rdx
        shr     rdi, 4
        movabs  rdx, 878416384462359600
        xor     eax, eax
        cmp     rcx, rdx
        seta    al
        add     rax, rdi
        ret

div_ceil_2_new:
        lea     rax, [rdi - 1]
        shr     rax
        inc     rax
        ret

div_ceil_2_old:
        mov     rax, rdi
        mov     rcx, rdi
        shr     rcx
        sub     rax, rcx
        ret

div_ceil_3_new:
        lea     rax, [rdi - 1]
        movabs  rcx, -6148914691236517205
        mul     rcx
        shr     rdx
        lea     rax, [rdx + 1]
        ret

div_ceil_3_old:
        mov     rax, rdi
        movabs  rcx, -6148914691236517205
        mul     rcx
        shr     rdx
        movabs  rsi, 6148914691236517205
        xor     ecx, ecx
        cmp     rax, rsi
        seta    cl
        add     rcx, rdx
        mov     rax, rcx
        ret

div_ceil_generic_new:
        mov     rax, rdi
        dec     rax
        mov     rcx, rax
        or      rcx, rsi
        shr     rcx, 32
        je      .LBB8_1
        xor     edx, edx
        div     rsi
        inc     rax
        ret
.LBB8_1:
        xor     edx, edx
        div     esi
        inc     rax
        ret

div_ceil_generic_old:
        mov     rax, rdi
        mov     rcx, rdi
        or      rcx, rsi
        shr     rcx, 32
        je      .LBB9_1
        xor     edx, edx
        div     rsi
        cmp     rdx, 1
        sbb     rax, -1
        ret
.LBB9_1:
        xor     edx, edx
        div     esi
        cmp     rdx, 1
        sbb     rax, -1
        ret
```

</details>

It is theoretically possible to adapt this algorithm for normal unsigned integers and possibly even signed normal integers,
but the results were questionable at best, which is why the change was restricted to unsigned nonzero integers.
core: Make funnel shifts panic only if overflow checks are enabled

Change from the existing behavior of panicking unconditionally to panicking only if overflow checks are enabled, wrapping otherwise. This is more consistent with other operations, and gives slightly better codegen https://rust.godbolt.org/z/Yz81zhbno.

Suggested in the stabilization PR at rust-lang#161015 (comment).

The first commit adds some simple tests for overflow behavior that I couldn't find existing anywhere else.
…, r=tgross35

run `classify-runtime-const` test for `f128`

This seems to work now, at least locally on linux and windows-gnu.

@bors try jobs=test-various,aarch64-apple-*,*-gnu-nopt-*,x86_64-mingw-*,aarch64-msvc-*,arm-android
…ouxu

renovate: add lockfile update warning
…, r=ytmimi

Stop rustfmt deleting attributes in fn params

Currently, rustfmt deletes attributes in function type parameters, for example:
```rust
type F = fn(#[rustc_splat] ());
```

Becomes:
```rust
type F = fn(());
```

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f56e4727022f44a6e5c937c1521830f9)

This is an annoying and confusing bug, and causes formatted code to silently change meaning, or fail compilation.

This PR cherry-picks the fix and tests from rust-lang/rustfmt#6590 to `rust-lang/rust`.

We're discussing a potential beta backport in [Zulip #t-rustfmt > Attributes in fn type deleted on stable but not nightly](https://rust-lang.zulipchat.com/#narrow/channel/357797-t-rustfmt/topic/Attributes.20in.20fn.20type.20deleted.20on.20stable.20but.20not.20nightly/with/618688539), which is why this PR is separate to the subtree sync.

Tracking issue: rust-lang#153629
- This formatting bug impacts splatted function pointers
- We just published [a "call for experiment" blog post](https://blog.rust-lang.org/inside-rust/2026/08/19/overloading-experiment/), including experiments with splatted function pointers

r? @ytmimi
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 25, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Aug 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c887061 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup of 10 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 41840b4 (41840b4c4003c955b6664bc29bafa04cc30f3e10)
Base parent: 9bb55c8 (9bb55c8c865411b7d9dea6ff743e583d510d89f5)

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 25, 2026
@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 9m 37s
Pushing 26747db to main...

@rust-bors
rust-bors Bot merged commit 26747db into rust-lang:main Aug 25, 2026
15 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 9bb55c8 (parent) -> 26747db (this PR)

Test differences

Show 4435 test diffs

Stage 1

  • [crashes] tests/crashes/108248.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/108428.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/138262.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/142155.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/144241.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/149562.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/152414.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/152416.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/152626.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/154903.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/154963.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/155053.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/156101.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/156288.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/std/overflow-check-ops.rs#ERROR: [missing] -> pass (J3)
  • [ui (polonius)] tests/ui/std/overflow-check-ops.rs#WRAP: [missing] -> pass (J3)
  • [ui] tests/ui/std/overflow-check-ops.rs#ERROR: [missing] -> pass (J5)
  • [ui] tests/ui/std/overflow-check-ops.rs#WRAP: [missing] -> pass (J5)
  • [ui] tests/ui/float/classify-runtime-const.rs#ctfe: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J6)
  • [ui] tests/ui/float/classify-runtime-const.rs#noopt: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J6)
  • [ui] tests/ui/float/classify-runtime-const.rs#opt: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J6)
  • [ui] tests/ui/float/classify-runtime-const.rs#ctfe: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J8)
  • [ui] tests/ui/float/classify-runtime-const.rs#noopt: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J8)
  • [ui] tests/ui/float/classify-runtime-const.rs#opt: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J8)
  • fs::tests::test_dir_create_dir: [missing] -> pass (J10)
  • fs::tests::test_dir_open_dir: [missing] -> pass (J10)
  • fs::tests::test_dir_remove_dir: [missing] -> pass (J10)

Stage 2

  • [crashes] tests/crashes/108248.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/108428.rs: ignore (ignored if rustc wasn't built with debug assertions) -> [missing] (J0)
  • [crashes] tests/crashes/142155.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/149562.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/152414.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/152416.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/152626.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J0)
  • [crashes] tests/crashes/108248.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/108428.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/142155.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/149562.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/152414.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/152416.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/152626.rs: [missing] -> pass (J1)
  • [ui] tests/ui/float/classify-runtime-const.rs#ctfe: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J4)
  • [ui] tests/ui/float/classify-runtime-const.rs#noopt: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J4)
  • [ui] tests/ui/float/classify-runtime-const.rs#opt: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> ignore (ignored when the LLVM version 21.1.2 is older than 23.0.0) (J4)
  • [crashes] tests/crashes/144241.rs: [missing] -> pass (J7)
  • [crashes] tests/crashes/154903.rs: [missing] -> pass (J7)
  • [crashes] tests/crashes/154963.rs: [missing] -> pass (J7)
  • [crashes] tests/crashes/155053.rs: [missing] -> pass (J7)
  • [crashes] tests/crashes/156101.rs: [missing] -> pass (J7)
  • [crashes] tests/crashes/156288.rs: [missing] -> pass (J7)
  • fs::tests::test_dir_create_dir: [missing] -> pass (J9)
  • fs::tests::test_dir_open_dir: [missing] -> pass (J9)
  • fs::tests::test_dir_remove_dir: [missing] -> pass (J9)
  • [crashes] tests/crashes/138262.rs: [missing] -> ignore (gcc backend is marked as ignore) (J11)
  • [crashes] tests/crashes/138262.rs: [missing] -> ignore (ignored on targets without CFI sanitizer) (J12)
  • [ui] tests/ui/float/classify-runtime-const.rs#ctfe: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J13)
  • [ui] tests/ui/float/classify-runtime-const.rs#noopt: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J13)
  • [ui] tests/ui/float/classify-runtime-const.rs#opt: pass -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J13)
  • [ui] tests/ui/std/overflow-check-ops.rs#ERROR: [missing] -> pass (J14)
  • [ui] tests/ui/std/overflow-check-ops.rs#WRAP: [missing] -> pass (J14)
  • [crashes] tests/crashes/138262.rs: [missing] -> pass (J15)

Additionally, 4374 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 26747db4f50d83f3670834410ac16fbd39c14c15 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-i686-linux: 1h 10m -> 1h 51m (+57.6%)
  2. dist-sparcv9-solaris: 1h 7m -> 1h 38m (+45.0%)
  3. x86_64-msvc-ext2: 1h 49m -> 1h 6m (-38.9%)
  4. i686-gnu-nopt-1: 1h 57m -> 1h 14m (-36.7%)
  5. x86_64-msvc-ext1: 1h 41m -> 2h 14m (+32.6%)
  6. test-various: 1h 31m -> 1h 59m (+31.3%)
  7. x86_64-gnu-aux: 2h 32m -> 1h 48m (-29.2%)
  8. x86_64-gnu-tools: 47m 48s -> 1h 1m (+28.5%)
  9. dist-s390x-linux: 1h 15m -> 1h 34m (+25.7%)
  10. pr-check-1: 27m 58s -> 35m 7s (+25.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160533 dirfd dir operations (3/4) 1ab8834a9a2d8a48b007e40a3f1370bcc85ca80c
(link)
#161294 add crashtests [6/N] dbcb86c4fb37f2a33fc144c467888e83b3880784
(link)
#160392 library: motor: bump moto-rt ABI ver to 17 94b35bb98da683f989137b3e3521ddd73b8c2e06
(link)
#161646 interpret: fix after_local_read handling 8d80bc2f5bcd874f8882ec71b27d90e265f3cce3
(link)
#161682 Update books a5d2437b367d76652947079389eeedbde6ac153c
(link)
#160819 Rework div_ceil for nonzero integers 46f8d2c354b321a05d1791fa4f906dd095a2f6b0
(link)
#161204 core: Make funnel shifts panic only if overflow checks are … 4d4f70e42c42cd05d6533e9e9668d343e206031f
(link)
#161591 run classify-runtime-const test for f128 e4b46d69ad0dc1b170bdc410a33a0234c8058fa4
(link)
#161680 renovate: add lockfile update warning 2197f0d8fc3d770b29c740abfb3ab4cf3b73df71
(link)
#161709 Stop rustfmt deleting attributes in fn params fa929e49ee3e438cdd57c8df31fff5a250002525
(link)

parent commit: 9bb55c8c86

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (26747db): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -5.3%, secondary -3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.3% [-5.3%, -5.3%] 1
Improvements ✅
(secondary)
-3.7% [-3.7%, -3.7%] 1
All ❌✅ (primary) -5.3% [-5.3%, -5.3%] 1

Cycles

Results (primary 2.7%, secondary -6.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.4% [-10.2%, -2.6%] 3
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 476.471s -> 471.198s (-1.11%)
Artifact size: 400.96 MiB -> 400.99 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.