Skip to content

Rollup of 4 pull requests#155185

Merged
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
matthiaskrgr:rollup-JYNqFhW
Apr 12, 2026
Merged

Rollup of 4 pull requests#155185
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
matthiaskrgr:rollup-JYNqFhW

Conversation

@matthiaskrgr
Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

arferreira and others added 10 commits March 9, 2026 18:31
- [CVE-2026-6042] is a denial of service in `iconv`.
- [CVE-2026-40200] is an out-of-bounds write in `qsort`.

Neither is relevant to Rust itself, but they could be used in mixed-
language projects that link with our `self-contained/libc.a`.

[CVE-2026-6042]: https://www.openwall.com/lists/oss-security/2026/04/09/19
[CVE-2026-40200]: https://www.openwall.com/lists/musl/2026/04/10/3
Patch musl's CVE-2026-6042 and CVE-2026-40200

- [CVE-2026-6042] is a denial of service in `iconv`.
- [CVE-2026-40200] is an out-of-bounds write in `qsort`.

Neither is relevant to Rust itself, but they could be used in mixed-language projects that link with our `self-contained/libc.a`.

[CVE-2026-6042]: https://www.openwall.com/lists/oss-security/2026/04/09/19
[CVE-2026-40200]: https://www.openwall.com/lists/musl/2026/04/10/3
…-diagnostic-path, r=jackh726

Deprioritize doc(hidden) re-exports in diagnostic paths

Fixes rust-lang#153477.

This is the other half of rust-lang#99698, which fixed the case where the *parent module* is `#[doc(hidden)]` but left the case where the re-export itself is `#[doc(hidden)]` as a FIXME (with a tracking test in `dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs`).

The problem: when a crate does `#[doc(hidden)] pub use core::error::Error`, diagnostics pick up the hidden re-export path instead of the canonical one. For example, `snafu::Error` instead of `std::error::Error`.

Two changes:

In `visible_parent_map`, the `add_child` closure now checks whether the re-export itself is `#[doc(hidden)]` via `reexport_chain` and sends it to `fallback_map`, same treatment as doc-hidden parents and underscore re-exports.

`should_encode_attrs` now returns `true` for `DefKind::Use`. Without this, `#[doc(hidden)]` on `use` items was never written to crate metadata, so `is_doc_hidden` always returned `false` cross-crate. This was the actual root cause, the check in `visible_parent_map` alone isn't enough if the attribute isn't in the metadata.

The existing FIXME test now serves as the regression test. The `.stderr` goes from suggesting `hidden_child::__private::Some(1i32)` to just `Some(1i32)`.

cc @eggyal
…aviscross

unsafe keyword docs: bring back unsafe_op_in_unsafe_fn lint discussion

@traviscross in rust-lang#141471 you asked me to also update the text to account for the edition change. Apparently I did that by entirely removing this part of the discussion (except for a dangling forward reference, a "see below"). Given that old editions still exist and given that `unsafe_op_in_unsafe_fn` is just a lint so the old behavior also still exists on new editions, I am no longer sure that was a good idea, so this brings back the old text with some editing to explain the current situation.
…w, r=fee1-dead

impl const Residual for ControlFlow

Feature: rust-lang#91285 (`try_trait_v2_residual`/`const_try_residual`)

r? @fee1-dead
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 12, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure 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. labels Apr 12, 2026
@matthiaskrgr
Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 12, 2026

📌 Commit 11469dc has been approved by matthiaskrgr

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 Apr 12, 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 Apr 12, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 12, 2026

☀️ Test successful - CI
Approved by: matthiaskrgr
Duration: 3h 8m 43s
Pushing 540f43a to main...

@rust-bors rust-bors bot merged commit 540f43a into rust-lang:main Apr 12, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 12, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#152613 unsafe keyword docs: bring back unsafe_op_in_unsafe_fn lint… 506de34cf80bbe9ca36649ed61f67d932370dd71 (link)
#153630 Deprioritize doc(hidden) re-exports in diagnostic paths eabf87b831a1ccabbfbb560674cc39f961213613 (link)
#155142 impl const Residual for ControlFlow 5f5793ecfa2618aed99fd9a11db62b628863a312 (link)
#155171 Patch musl's CVE-2026-6042 and CVE-2026-40200 e6ae85c6cf5e10ace2a55c5ace77cc7abd7f7777 (link)

previous master: d32e620a10

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

@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 d32e620 (parent) -> 540f43a (this PR)

Test differences

Show 118 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 540f43a224317d894a9a0710a8d67704f179a33c --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-aarch64-apple: 2h 5m -> 1h 37m (-22.0%)
  2. x86_64-gnu-aux: 2h 3m -> 2h 20m (+13.5%)
  3. x86_64-gnu-llvm-22-2: 1h 24m -> 1h 35m (+12.9%)
  4. x86_64-gnu-nopt: 2h 33m -> 2h 13m (-12.8%)
  5. i686-msvc-2: 2h -> 2h 14m (+11.3%)
  6. tidy: 2m 31s -> 2m 47s (+10.6%)
  7. aarch64-gnu-debug: 1h 5m -> 1h 12m (+10.1%)
  8. aarch64-apple: 2h 48m -> 2h 32m (-9.8%)
  9. dist-x86_64-msvc-alt: 2h 46m -> 2h 31m (-9.0%)
  10. dist-apple-various: 1h 38m -> 1h 29m (-8.3%)
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

Finished benchmarking commit (540f43a): 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.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
0.6% [0.1%, 2.3%] 7
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.2%, 0.3%] 2

Max RSS (memory usage)

Results (primary 1.1%, secondary 2.1%)

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

mean range count
Regressions ❌
(primary)
1.1% [0.9%, 1.4%] 3
Regressions ❌
(secondary)
4.6% [2.5%, 5.9%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.8% [-7.8%, -7.8%] 1
All ❌✅ (primary) 1.1% [0.9%, 1.4%] 3

Cycles

Results (primary -3.0%, 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)
5.1% [3.3%, 6.9%] 2
Improvements ✅
(primary)
-3.0% [-3.6%, -2.4%] 2
Improvements ✅
(secondary)
-21.1% [-21.1%, -21.1%] 1
All ❌✅ (primary) -3.0% [-3.6%, -2.4%] 2

Binary size

Results (primary 0.2%, 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.2% [0.0%, 0.8%] 47
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 14
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.0%, 0.8%] 47

Bootstrap: 489.526s -> 491.503s (0.40%)
Artifact size: 394.19 MiB -> 394.21 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Apr 12, 2026
@panstromek
Copy link
Copy Markdown
Contributor

perf triage:

This is probably #153630. Other PRs are just docs, CI (unrelated to rust-timer) and making trait const, those should all have none or very little impact on perf.

I'll continue the discusssion there.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants