Skip to content

Rollup of 15 pull requests#159113

Merged
rust-bors[bot] merged 35 commits into
rust-lang:mainfrom
jhpratt:rollup-xqDDX7W
Jul 11, 2026
Merged

Rollup of 15 pull requests#159113
rust-bors[bot] merged 35 commits into
rust-lang:mainfrom
jhpratt:rollup-xqDDX7W

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 11, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

joboet and others added 30 commits June 21, 2026 19:15
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
For small repr(C) aggregates with padding, direct constant
initialization can still lower into field-wise construction plus
memcpy. That leaves the backend to rediscover that the whole object
is a single constant byte pattern.

This is especially visible for non-zero constant aggregates. Instead
of materializing them as separate field stores, we want codegen_ssa to
emit the packed value directly. For example, a value like

    InnerPadded { a: 0, b: 1, c: 0 }

can otherwise lower to something like

    store i16 0, ptr %val, align 4
    store i8 1, ptr %val_plus_2, align 2
    store i32 0, ptr %val_plus_4, align 4
    call void @llvm.memcpy(..., ptr %val, ...)

while this change produces

    store i64 65536, ptr %val, align 4
    call void @llvm.memcpy(..., ptr %val, ...)

Why not solve this in LLVM?

At the problematic lowering point, rustc still knows that the MIR
aggregate is small and fully constant. LLVM only sees a lowered stack
temporary built from per-field stores and then copied out. Recovering
that packed constant there would require rediscovering front-end
aggregate semantics after lowering, so emitting the packed store in
rustc is the simpler and more local fix.

Why not keep the previous typed-copy approach?

An earlier approach zeroed padding on typed copies whose source could
be traced back to a constant assignment. That helped some cases, but it
also widened the optimization to runtime copy paths and could introduce
extra runtime stores purely to maintain padding knowledge. That is not
an acceptable tradeoff here.

Keep the scope narrow instead: only handle direct MIR aggregates whose
fields are all constants, and pack them according to the target
endianness before emitting a single integer store.

Add a focused codegen test covering the original PR 157690 entry
points together with non-zero constant cases. The test uses
-Cno-prepopulate-passes so it checks the immediate-store shape directly
at rustc codegen time, instead of depending on later LLVM store
merging.
`EIO` decoded to `ErrorKind::Uncategorized`, so a low-level I/O
failure could only be detected through `raw_os_error()`. Map it, and
the equivalent codes on Windows (`ERROR_IO_DEVICE`) and VEXos
(`FR_DISK_ERR`), to a new unstable `InputOutputError` variant.
…alfJung

codegen_ssa: pack small const aggregates into immediate stores

Close rust-lang#157373

For small repr(C) aggregates with padding, direct constant
initialization can still lower into field-wise construction plus
memcpy. That leaves the backend to rediscover that the whole object
is a single constant byte pattern.

This is especially visible for non-zero constant aggregates. Instead
of materializing them as separate field stores, we want codegen_ssa to
emit the packed value directly. For example, a value like

    InnerPadded { a: 0, b: 1, c: 0 }

can otherwise lower to something like

    store i16 0, ptr %val, align 4
    store i8 1, ptr %val_plus_2, align 2
    store i32 0, ptr %val_plus_4, align 4
    call void @llvm.memcpy(..., ptr %val, ...)

while this change produces

    store i64 65536, ptr %val, align 4
    call void @llvm.memcpy(..., ptr %val, ...)

Why not solve this in LLVM?

At the problematic lowering point, rustc still knows that the MIR
aggregate is small and fully constant. LLVM only sees a lowered stack
temporary built from per-field stores and then copied out. Recovering
that packed constant there would require rediscovering front-end
aggregate semantics after lowering, so emitting the packed store in
rustc is the simpler and more local fix.

Why not keep the previous typed-copy approach?

An earlier approach zeroed padding on typed copies whose source could
be traced back to a constant assignment. That helped some cases, but it
also widened the optimization to runtime copy paths and could introduce
extra runtime stores purely to maintain padding knowledge. That is not
an acceptable tradeoff here.

Keep the scope narrow instead: only handle direct MIR aggregates whose
fields are all constants, and pack them according to the target
endianness before emitting a single integer store.
Use `as_lang_item` instead of repeatedly matching

drive-by fix I noticed while reviewing https://github.com/rust-lang/rust/pull/157489/changes#r3550851573
…ochenkov

Move NativeLib::filename to the rmeta-link archive member

Second PR in rust-lang#138243
Moves `NativeLib::filename` out of `rmeta` into `lib.rmeta-link` archive member that was introduced in the first PR. Filename is a link time only data so requiring a full metadata decode should be avoided.  It is stored as `(name, filename)` pairs keyed by name, the new `MetadataLoader::get_rlib_native_lib_filenames` patches it back on decode.  Also bumped `METADATA_VERSION` from version 10 to 11. Added also new round trip test and existing bundled-libs tests still pass.
allow `Allocator`s to be used as `#[global_allocator]`s

The (hopefully) immanent stabilisation of the `Allocator` trait raises the question of what is to be done about the older, already-stable `GlobalAlloc` trait. In my opinion, having two nearly-identical traits for the same purpose is needlessly confusing. Going forward, `Allocator` as the more modern interface should be _the_ allocator trait.

With `Allocator` being currently unstable, there is the possibility of implementing `GlobalAlloc` for all `Allocator`s, thereby allowing them to be used as `#[global_allocator]` and allowing crates to seamlessly (and semver-compatibly) switch to `Allocator`. However, unconditionally implementing `GlobalAlloc` presents a footgun to users, as e.g. using `Global` as `#[global_allocator]` will lead to infinite recursion. @nia-e initially tried to resolve this in e1b7097 (rust-lang#156882) by using weird trait trickery to implement `GlobalAlloc` for every allocator except `Global`. But this does not go far enough, e.g. a bump allocator that itself allocates from `Global` is similarly unsuitable as global allocator.

Thus, with this PR, I'd like to propose adding a new marker trait for allocators that can be used as `#[global_allocator]`:
```rust
// in core::alloc

trait GlobalAllocator: Allocator {}
```
`GlobalAlloc` can then be implemented for all `GlobalAllocator`s:
```rust
impl<A> GlobalAlloc for A
where
    A: GlobalAllocator
{
    /* ... */
}
```

This provides a backwards-compatible way for allocator libraries to switch to the new interface and allows deprecating `GlobalAlloc` (not done here). Over time, I expect that `GlobalAlloc` will become more and more of an implementation detail of the `#[global_allocator]` macro (for instance, one might add perma-unstable, hidden methods for things like `grow_zeroed` that are customised only by the blanket implementation).

With regards to naming, I chose `GlobalAllocator` to mirror `Allocator`. `GlobalAlloc` should probably be deprecated quickly after stabilising `GlobalAllocator` to avoid confusion. For the same reason, I think it'd be better to add `GlobalAllocator` before stabilising `Allocator` – but that is not a necessity.

r? @nia-e
@rustbot label +I-libs-api-nominated
jq directives for jsondocck

Closes rust-lang#142479.

Adds `jq` directives for `jsondocck`.

I decided to add jq instead of replacing jsonpath entirely so that migration could happen incrementally. In theory, it should be possible to replace every jsonpath test case with the new `jq` directives. Moving forward, this might put more burden on reviewers as test case writers would have the option to use jq or jsonpath or even both. ~~Note that you cannot use `jq_set` with jsonpath directives or `set`  with jq directives~~. Diff should be reviewed without whitespace.

r? @aDotInTheVoid
merge DefKind::InlineConst into AnonConst

This is a closely related followup to rust-lang#158375 (a condition of merging that PR was doing this as a followup)

This merge conflicts with rust-lang#158617 ; prefer merging that one first please~

This PR is within the general goal of const generics / `generic_const_args` and perhaps specifically rust-lang/project-const-generics#108 but is mostly a code cleanup rather than implementing any particular feature

---

Anon consts (the `1 + 2` in `let x: [u8; 1 + 2];`) are closely related to inline consts (the `const {}` in `let x = const { 1 + 2 };`). They are especially related now that both can be used in the type system (by the above PR) and should be treated identically in that scenario. In general, they should be treated the same, as evidenced by the number of matches touched in this PR that just match on both. This PR merges the two DefKinds into one, mostly arbitrarily and bikesheddily choosing to use the name `AnonConst` for the merged concept (e.g. both `DefKind::InlineConst` and `DefKind::AnonConst` used `ast::AnonConst`, so `ast::AnonConst` should probably be named whatever the merged `DefKind` concept is named).

When you absolute must distinguish between the two, `tcx.anon_const_kind` allows you to do so - however, anon consts/inline consts in the type system intentionally appear identically under `anon_const_kind`. Indeed, the places where we distinguish between the two raised my eyebrows a few times when doing this PR, and being a little more explicit and loud about it is helpful for code clarity, IMO.

r? @BoxyUwU
Stabilize String::from_utf8_lossy_owned

Passed FCP in rust-lang#129436. Closes rust-lang#129436.

r? libs
…s-ok-unwrap, r=nnethercote

Add codegen test for Result is_ok unwrap

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

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5543890 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] arrayvec test:false 0.226
   Compiling either v1.15.0
error: linking with `cc` failed: exit status: 1
  |
  = note:  "cc" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage1-rustc/release/build/blake3/8bbce82c0cc62026/out/rustcwwVMUJ/symbols.o" "<2 object files omitted>" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage1-rustc/release/build/cc/f5f3db14ca6f290d/out/libcc-f5f3db14ca6f290d.rlib" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage1-rustc/release/build/shlex/2455ab951a4a1513/out/libshlex-2455ab951a4a1513.rlib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage1-rustc/release/build/blake3/8bbce82c0cc62026/out/build_script_build" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: clang: error: unable to execute command: Segmentation fault: 11
          clang: error: linker command failed due to signal (use -v to see invocation)
          Apple clang version 17.0.0 (clang-1700.6.3.2)
          Target: arm64-apple-darwin24.6.0
          Thread model: posix
          InstalledDir: /Applications/Xcode_26.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
          clang: note: diagnostic msg: 
          ********************
          
          PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
          Linker snapshot containing input(s) and associated run script(s) are located at:
          clang: note: diagnostic msg: /var/folders/k8/j7r3p6cx43xdqhzy2rmp6tqr0000gn/T/linker-crash-708f86
          clang: note: diagnostic msg: 
          
          ********************
          

[RUSTC-TIMING] build_script_build test:false 3.406
error: could not compile `blake3` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] either test:false 0.137
[RUSTC-TIMING] rustc_macros test:false 4.987
Bootstrap failed while executing `dist bootstrap enzyme --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin`
Currently active steps:

@jhpratt

jhpratt commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

@bors retry

@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 Jul 11, 2026
@rust-bors rust-bors Bot mentioned this pull request Jul 11, 2026
@rust-bors

This comment has been minimized.

@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 Jul 11, 2026
@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 13m 5s
Pushing ad49852 to main...

@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 48e8ec6 (parent) -> ad49852 (this PR)

Test differences

Show 646 test diffs

Stage 1

  • [ui (polonius)] tests/ui/allocator/not-an-allocator.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/associated-types/unconstrained-dyn-assoc-type-lifetime.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/binding/tuple-binder-on-err-ty.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/codegen/slice-iter-enumerate-opt.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/collections/hashmap/hashmap-debug-format.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/derived-errors/no-spurious-unconstrained-param.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/issues/issue-33504.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-33941.rs#next: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-34334.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-34503.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-35139.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-35423.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-35570.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-3559.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-3574.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-35976.rs#unimported: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-36299.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-36474.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/issues/issue-36816.rs: pass -> [missing] (J1)
  • [ui (polonius)] tests/ui/iterators/cloned-hashmap-iter-type-mismatch-diag.rs#next: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lifetimes/lifetime-param-in-fn-coercion.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/macros/macro-in-array-len-expr.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/structs-enums/generic-recursive-list-struct.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/suggestions/trait-object-import-suggestion-on-method.rs#imported: [missing] -> pass (J1)
  • [ui] tests/ui/allocator/not-an-allocator.rs: [missing] -> pass (J2)
  • [ui] tests/ui/allocator/not-an-allocator.rs#w: ignore (only executed when the operating system is windows) -> [missing] (J2)
  • [ui] tests/ui/associated-types/unconstrained-dyn-assoc-type-lifetime.rs: [missing] -> pass (J2)
  • [ui] tests/ui/binding/tuple-binder-on-err-ty.rs: [missing] -> pass (J2)
  • [ui] tests/ui/codegen/slice-iter-enumerate-opt.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const-eval/volatile.rs: [missing] -> pass (J2)
  • [ui] tests/ui/errors/error-count.rs: [missing] -> pass (J2)
  • [ui] tests/ui/generics/cyclic-default-type-param-via-alias.rs: [missing] -> pass (J2)
  • [ui] tests/ui/generics/unused-type-and-lifetime-param.rs: [missing] -> pass (J2)
  • [ui] tests/ui/higher-ranked/trait-bounds/normalize-under-binder/assoc-type-projection-in-dyn-and-fn.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-33504.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-33525.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-33770.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-33941.rs#current: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-34373.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-3447.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-34751.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-35423.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-3559.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-35976.rs#imported: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-36299.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-36744-bitcast-args-if-needed.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-36816.rs: pass -> [missing] (J2)
  • [ui] tests/ui/iterators/cloned-hashmap-iter-type-mismatch-diag.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/macros/macro-in-array-len-expr.rs: [missing] -> pass (J2)
  • [ui] tests/ui/match/match-borrowed-str.rs: [missing] -> pass (J2)
  • [ui] tests/ui/shadowed/shadow-unit-struct-in-closure.rs: [missing] -> pass (J2)
  • [ui] tests/ui/structs-enums/generic-recursive-list-struct.rs: [missing] -> pass (J2)
  • [ui] tests/ui/suggestions/trait-object-import-suggestion-on-method.rs#imported: [missing] -> pass (J2)
  • [ui] tests/ui/suggestions/trait-object-import-suggestion-on-method.rs#unimported: [missing] -> pass (J2)
  • [ui] tests/ui/threads-sendsync/no-double-lock-same-thread.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/opaques/dont-ice-replacing-non-rigid-opaque.rs: [missing] -> pass (J2)
  • [ui] tests/ui/where-clauses/obligation-error-propagation.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/aggregate-padding-zero.rs#powerpc64: [missing] -> pass (J6)
  • [codegen] tests/codegen-llvm/aggregate-padding-zero.rs#x86_64: [missing] -> pass (J6)
  • [codegen] tests/codegen-llvm/issues/result-is-ok-unwrap.rs: [missing] -> pass (J6)

Stage 2

  • [ui] tests/ui/allocator/not-an-allocator.rs: [missing] -> pass (J0)
  • [ui] tests/ui/associated-types/unconstrained-dyn-assoc-type-lifetime.rs: [missing] -> pass (J0)
  • [ui] tests/ui/codegen/slice-iter-enumerate-opt.rs: [missing] -> pass (J0)
  • [ui] tests/ui/collections/hashmap/hashmap-debug-format.rs: [missing] -> pass (J0)
  • [ui] tests/ui/derived-errors/no-spurious-unconstrained-param.rs: [missing] -> pass (J0)
  • [ui] tests/ui/errors/error-count.rs: [missing] -> pass (J0)
  • [ui] tests/ui/higher-ranked/trait-bounds/normalize-under-binder/assoc-type-projection-in-dyn-and-fn.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-33504.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-33525.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-33770.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-33941.rs#current: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-33941.rs#next: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-34334.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-34503.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-34751.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-35139.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-35423.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-35570.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-35976.rs#imported: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-36299.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-36474.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-36744-bitcast-args-if-needed.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-36816.rs: pass -> [missing] (J0)
  • [ui] tests/ui/iterators/cloned-hashmap-iter-type-mismatch-diag.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/iterators/cloned-hashmap-iter-type-mismatch-diag.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/lifetime-in-unit-struct-pattern.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/lifetime-param-in-fn-coercion.rs: [missing] -> pass (J0)
  • [ui] tests/ui/match/range-arm-and-ref-arm.rs: [missing] -> pass (J0)
  • [ui] tests/ui/shadowed/shadow-unit-struct-in-closure.rs: [missing] -> pass (J0)
  • [ui] tests/ui/structs-enums/generic-recursive-list-struct.rs: [missing] -> pass (J0)
  • [ui] tests/ui/suggestions/trait-object-import-suggestion-on-method.rs#imported: [missing] -> pass (J0)
  • [ui] tests/ui/threads-sendsync/no-double-lock-same-thread.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/next-solver/opaques/dont-ice-replacing-non-rigid-opaque.rs: [missing] -> pass (J0)
  • [ui] tests/ui/where-clauses/obligation-error-propagation.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-34373.rs: pass -> [missing] (J3)
  • [ui] tests/ui/allocator/not-an-allocator.rs#u: ignore (only executed when the target family is unix) -> [missing] (J4)
  • [ui] tests/ui/allocator/not-an-allocator.rs#w: pass -> [missing] (J4)
  • [ui] tests/ui/generics/cyclic-default-type-param-via-alias.rs: [missing] -> ignore (ignored when the parallel frontend is enabled) (J5)
  • [codegen] tests/codegen-llvm/aggregate-padding-zero.rs#powerpc64: [missing] -> pass (J7)
  • [run-make] tests/run-make/compressed-debuginfo-zstd: pass -> ignore (ignored if LLVM wasn't build with zstd for ELF section compression or LLVM is not the default codegen backend) (J8)

(and 58 additional test diffs)

Additionally, 488 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 ad49852b6f3dd9c1c73fe909d8843bb7e464b387 --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. x86_64-gnu-gcc: 54m 6s -> 1h 24m (+55.7%)
  2. dist-android: 18m 38s -> 27m 21s (+46.8%)
  3. x86_64-gnu-gcc-core-tests: 14m 29s -> 19m 4s (+31.6%)
  4. dist-arm-linux-musl: 1h 16m -> 1h 40m (+30.9%)
  5. pr-check-1: 31m 24s -> 40m 50s (+30.0%)
  6. pr-check-2: 38m 22s -> 49m 36s (+29.3%)
  7. i686-gnu-nopt-2: 2h 20m -> 1h 40m (-28.2%)
  8. dist-x86_64-solaris: 1h 15m -> 1h 36m (+27.1%)
  9. x86_64-gnu-llvm-21-1: 57m 11s -> 41m 44s (-27.0%)
  10. dist-riscv64-linux: 1h 28m -> 1h 7m (-24.2%)
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-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#159106 Update LLVM 29c8f863cdf1bac3cf5cc8f1541def043930dc52 (link)
#157690 codegen_ssa: pack small const aggregates into immediate sto… 14ec4970af4d117704098ea7890c20dfbe4b856a (link)
#159005 Use as_lang_item instead of repeatedly matching 0fde07415484d5f9960ca9b1d7c107f1a9959bc2 (link)
#156735 Move NativeLib::filename to the rmeta-link archive member 8e603320fada7c7151cce9de45eb72db52462f64 (link)
#157153 allow Allocators to be used as #[global_allocator]s 0d7a79724493b4fc68c62ad27ca798ae2c3bc181 (link)
#158269 jq directives for jsondocck 7107318e912770833307d92ec38ff05d8c3cd0db (link)
#158767 merge DefKind::InlineConst into AnonConst 22a97706ce8c72f46adc89e1473873b73092cec8 (link)
#159099 Stabilize String::from_utf8_lossy_owned c7faa87897f28e32bf5898bb13b4be9a76e7ce8e (link)
#158930 Reorganize tests/ui/issues [20/N] 7a94ae515874588c731b96caf1d9727a72a3d617 (link)
#158965 Add codegen test for Result is_ok unwrap aa5f6d5b51a72937e3e919a88b49c32e5b5610a4 (link)
#158979 Reorganize tests/ui/issues [21/N] 68a481224e43d68966d2a48f0716d8efce38b0f4 (link)
#159050 assert only opaques with sub unified hidden infer are non-r… 634c606d4c6148d5e0df86f8efc234f51324b991 (link)
#159062 Remove unused WEAK_ONLY_LANG_ITEMS static 3eff9eb07a130b4cac6059cbbdd9d51d7251a79a (link)
#159070 Add io::ErrorKind::InputOutputError 881fc984a524b932d49bc25a995a33f74a6ca43e (link)
#159092 make volatile operations const 95ccb4384f68bbf28b7680cb24935860aed261a5 (link)

previous master: 48e8ec6f05

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 (ad49852): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.5% [0.2%, 0.6%] 5
Regressions ❌
(secondary)
0.3% [0.0%, 0.6%] 9
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 6
All ❌✅ (primary) 0.3% [-0.6%, 0.6%] 6

Max RSS (memory usage)

Results (primary -0.1%, secondary 3.3%)

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

mean range count
Regressions ❌
(primary)
3.9% [3.9%, 3.9%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-2.1%, 3.9%] 3

Cycles

Results (primary 2.4%, secondary 0.8%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
4.7% [1.5%, 9.3%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-6.3%, -2.7%] 4
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (secondary -0.0%)

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)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 490.729s -> 488.317s (-0.49%)
Artifact size: 389.29 MiB -> 389.82 MiB (0.14%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.