Skip to content

Rollup of 21 pull requests#154255

Merged
rust-bors[bot] merged 49 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-kVSo6wy
Mar 23, 2026
Merged

Rollup of 21 pull requests#154255
rust-bors[bot] merged 49 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-kVSo6wy

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

petrochenkov and others added 30 commits February 12, 2026 18:20
In CI, the receiver thread can be descheduled for a surprisingly long time, so
there's no guarantee that a timeout actually occurs.
Instead of relying on the linker to find the 'environ' symbol, use
dlsym.

Fixes rust-lang#153451
Sponsored by:	ConnectWise
Add a HasAttrs<'tcx, Tcx> trait to rustc_hir that allows find_attr! to
accept DefId, LocalDefId, OwnerId, and HirId directly, instead of
requiring callers to manually fetch the attribute slice first.

The trait is defined in rustc_hir with a generic Tcx parameter to avoid
a dependency cycle (rustc_hir cannot depend on rustc_middle). The four
concrete impls for TyCtxt are in rustc_middle.
This improves startup performance by 16%, shown by an optimized
hello-world program. glibc's `pthread_getattr_np` performs expensive
syscalls when reading `/proc/self/maps`. That is all wasted with
`panic = immediate-abort` active because `init()` immediately discards
the return value from `install_main_guard()`. A similar improvement can
be seen in environments that don't have `/proc`. This change is safe
because the immediately succeeding comment says that we rely on Linux's
"own stack-guard mechanism".
Avoid an ICE for:

    struct A;
    impl A<B> {}

The compiler no longer panics and can proceed to emit existing diagnostics.

Adds `tests/ui/missing/undeclared-generic-parameter.rs`.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Now that the tracking issue has been opened, point to it.
When a function's documentation has to explain the meaning of nested results
and options, then it is often a good candidate for using a custom result enum
instead.

This commit also renames `DepNodeColorMap::try_mark` to `try_set_color`, to
make it more distinct from the similarly-named `DepGraph::try_mark_green`.

The difference is that `try_mark_green` is a higher-level operation that tries
to determine whether a node _can_ be marked green, whereas `try_set_color` is a
lower-level operation that actually records a color for the node.
This method is only used to initialize the always-red node, which can be done
with `try_set_color` instead.
Both zstd and zlib are *known* compression algorithms, they just may not
be supported by the backend. We shouldn't mislead users into e.g.
thinking they made a typo.
privacy: Fix type privacy holes in RPITITs

A subset of rust-lang#146470.

Private types in RPITITs now report hard errors.
Private types in bounds of associated types still only report the `private_bounds` lint due to unacceptable amount of breakage (rust-lang#146470 (comment)).

Closes rust-lang#144139
…d, r=Mark-Simulacrum

Optimize BTreeMap::append() using CursorMut

Since [`BTreeMap::merge`](rust-lang#152418 (comment)) uses `CursorMut` to avoid reconstructing the map from scratch and instead inserting other `BTreeMap` at the right places or overwriting the value in self `BTreeMap` on conflict, we might as well do the same for `BTreeMap::append`. This also means that some of the code in `append.rs` can be removed; `bulk_push()` however is used by `bulk_build_from_sorted_iterator()`, which is used by the `From`/`FromIterator` trait impl on `BTreeMap`. Feels like we should rename the file or place the `bulk_push()` in an existing file.

The same additional optimization consideration that `BTreeMap::merge` has is also applied to `BTreeMap::append`.

r? @Mark-Simulacrum  since Mark has seen the `BTreeMap::merge` code already (only diff is the `Ordering::Equal` case and now one of the test assertions on a panic case has the correct value now).
@rustbot rustbot added O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Mar 23, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

📌 Commit baffc5e 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 Mar 23, 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 Mar 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 17m 55s
Pushing 13e2aba to main...

@rust-bors rust-bors bot merged commit 13e2aba into rust-lang:main Mar 23, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 23, 2026
@github-actions
Copy link
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 bbe8536 (parent) -> 13e2aba (this PR)

Test differences

Show 984 test diffs

Stage 1

  • [ui] tests/ui/issues/issue-44056.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-51947.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lto/lto-avx-target-feature.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lto/lto-weak-merge-functions.rs: [missing] -> pass (J1)
  • [ui] tests/ui/missing/undeclared-generic-parameter.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-10.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-11.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-4.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-5.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-6.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-7.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-8.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/open-ns-9.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/issues/issue-51947.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lto/lto-weak-merge-functions.rs: [missing] -> pass (J0)
  • [ui] tests/ui/missing/undeclared-generic-parameter.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-10.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-11.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-3.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-4.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-5.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-6.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-7.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-8.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/open-ns-9.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-44056.rs: ignore (gcc backend is marked as ignore) -> [missing] (J2)
  • [ui] tests/ui/lto/lto-avx-target-feature.rs: [missing] -> ignore (gcc backend is marked as ignore) (J2)
  • [ui] tests/ui/issues/issue-44056.rs: ignore (only executed when the architecture is x86_64) -> [missing] (J3)
  • [ui] tests/ui/lto/lto-avx-target-feature.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J3)
  • [ui] tests/ui/issues/issue-44056.rs: pass -> [missing] (J4)
  • [ui] tests/ui/lto/lto-avx-target-feature.rs: [missing] -> pass (J4)
  • sys::io::error::windows::tests::ntstatus_error: [missing] -> pass (J5)
  • sys::pal::windows::os::tests::ntstatus_error: pass -> [missing] (J5)

Additionally, 946 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 13e2abaac846b2680ae93e1b3bd9fe7fe1b9a7fe --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. pr-check-1: 35m 27s -> 25m 10s (-29.0%)
  2. dist-x86_64-apple: 1h 52m -> 2h 11m (+17.3%)
  3. x86_64-gnu-tools: 1h 4m -> 53m 2s (-17.2%)
  4. pr-check-2: 46m 13s -> 38m 23s (-17.0%)
  5. x86_64-rust-for-linux: 52m 55s -> 44m 6s (-16.7%)
  6. x86_64-gnu-aux: 2h 29m -> 2h 5m (-15.9%)
  7. x86_64-gnu-miri: 1h 35m -> 1h 20m (-15.6%)
  8. optional-x86_64-gnu-parallel-frontend: 2h 40m -> 2h 17m (-14.6%)
  9. i686-gnu-1: 2h 26m -> 2h 7m (-12.8%)
  10. x86_64-gnu-llvm-22-2: 1h 46m -> 1h 32m (-12.7%)
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
Collaborator

Finished benchmarking commit (13e2aba): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -4.8%, secondary 0.9%)

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.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-4.8% [-8.5%, -1.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.8% [-8.5%, -1.1%] 2

Cycles

Results (secondary -0.2%)

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

Binary size

Results (primary -0.0%, secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.1%, 0.3%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.0%] 51
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 24
All ❌✅ (primary) -0.0% [-0.1%, 0.3%] 56

Bootstrap: 488.646s -> 482.731s (-1.21%)
Artifact size: 396.92 MiB -> 396.84 MiB (-0.02%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows 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-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.