Skip to content

Rollup of 4 pull requests#156111

Merged
rust-bors[bot] merged 18 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-8X18OBD
May 3, 2026
Merged

Rollup of 4 pull requests#156111
rust-bors[bot] merged 18 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-8X18OBD

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

GTimothy and others added 18 commits April 30, 2026 16:38
splits the large triple suggestion into three
sets them to MaybeIncorrect
automatically determines the required/nicest borrowing to use.
…7 instead of E0594

a set of slightly different tests showing that E0594 can be reached in
some cases via autodereferencing, but also that slight variations
produce E0277 instead.
added a valid example that violated the assumption in the proposed
change: it is possible for a borrowee type to be a ref of it's borrowed
type.

removed the assumption, treated all cases appropriately.
…r printing MaybeUninit

The derived implementation requires `T: Debug`, and doesn't need to.
…r=Urgau

[rustdoc] Fix `doc_cfg` feature on reexports

Part of rust-lang#150268.

I don't mark the issue as fixed as I need to check the third case described in the issue. First commit comes from rust-lang#156020, will need to rebase this PR once the original is merged.

r? @Urgau
…nathanBrouwer

Fix 'assign to data in an index of' collection suggestions

fixes rust-lang#150001
fixes rust-lang/rust-analyzer#16076
fixes rust-lang#134917

The issues are threefold and linked:
 1. Assigning data to a ~~collection~~BTreeMap/HashMap suggests 3 solutions all marked as `MachineApplicable`
 2. The suggestions are slightly wrong with regards to their borrowing needs.
 3. The suggestions are not guaranteed to produce code that is valid, and suggestion number two is equivalent to an update, not an insertion.

This PR:
 - splits the large triple suggestion into three
 - sets them to `MaybeIncorrect`
 - automatically determines the required borrowing to use.

 I think this solution may not be very elegant, expecially the key typechecking / borrowing part, but it works. I am however very open to any improvement/change :)

 edit: edited to replace 'collection' with  BTreeMap/HashMap'
…RalfJung,ShoyuVanilla

Rip out rustc_layout_scalar_valid_range_* attribute support

And either removes tests for it or replaces the uses with pattern types.

primarily fixes rust-lang#135996

fixes rust-lang#147761
fixes rust-lang#133652
…uillaumeGomez

Hand-implement `impl Debug for NumBuffer` to avoid constraining `T` or printing MaybeUninit

The derived implementation requires `T: Debug`, and doesn't need to.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 3, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 3, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 3, 2026

📌 Commit 0d98c12 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 3, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 3, 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 May 3, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 3, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 19m 37s
Pushing 818811b to main...

@rust-bors rust-bors Bot merged commit 818811b into rust-lang:main May 3, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 3, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#152216 Fix 'assign to data in an index of' collection suggestions 8b65a8fbd35e2105b0b2d07b450dbe8b16bae41b (link)
#155433 Rip out rustc_layout_scalar_valid_range_* attribute support 684d04c9264557dd65fff30399def8c8c8e8291f (link)
#156073 [rustdoc] Fix doc_cfg feature on reexports 4b9ad0114841fa97d7c0cbe3020da7cf4d77836d (link)
#156098 Hand-implement impl Debug for NumBuffer to avoid constrai… 7838f962fc5d017ba8c2eab684c260e28b9d76e7 (link)

previous master: 54f67d248b

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

github-actions Bot commented May 3, 2026

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 54f67d2 (parent) -> 818811b (this PR)

Test differences

Show 47 test diffs

Stage 1

  • [crashes] tests/crashes/122681.rs: pass -> [missing] (J1)
  • [incremental] tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs: pass -> [missing] (J1)
  • [rustdoc-html] tests/rustdoc-html/doc-cfg/reexports.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/invalid_rustc_layout_scalar_valid_range.rs: pass -> [missing] (J1)
  • [ui] tests/ui/borrowck/index-mut-help2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-trait/unsafety-checking-cycle.rs: pass -> [missing] (J1)
  • [ui] tests/ui/layout/valid_range_oob.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/initializing-ranged-via-ctor.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged-ctor-as-fn-ptr.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints2_const.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3_const.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3_match.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints4.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints4_const.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints_const.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints_macro.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/unsafe-assign.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsafe/unsafe-borrow.rs: pass -> [missing] (J1)

Stage 2

  • [ui] tests/ui/attributes/invalid_rustc_layout_scalar_valid_range.rs: pass -> [missing] (J0)
  • [ui] tests/ui/borrowck/index-mut-help2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/unsafety-checking-cycle.rs: pass -> [missing] (J0)
  • [ui] tests/ui/layout/valid_range_oob.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/initializing-ranged-via-ctor.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged-ctor-as-fn-ptr.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints2_const.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3_const.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints3_match.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints4.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints4_const.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints_const.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/rustc_layout_scalar_valid_range/ranged_ints_macro.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/unsafe-assign.rs: pass -> [missing] (J0)
  • [ui] tests/ui/unsafe/unsafe-borrow.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/122681.rs: pass -> [missing] (J2)
  • [incremental] tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs: ignore (gcc backend is marked as ignore) -> [missing] (J3)
  • [rustdoc-html] tests/rustdoc-html/doc-cfg/reexports.rs: [missing] -> pass (J4)
  • [incremental] tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs: pass -> [missing] (J5)

Additionally, 4 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 818811b3cd1e0ff0d8ef20d5a4cf0b7c079929bc --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-msvc-ext1: 1h 45m -> 2h 16m (+30.1%)
  2. i686-gnu-2: 1h 10m -> 1h 30m (+28.6%)
  3. x86_64-gnu-llvm-21: 59m 12s -> 1h 13m (+23.8%)
  4. dist-s390x-linux: 1h 13m -> 1h 29m (+22.4%)
  5. i686-gnu-nopt-1: 2h 4m -> 1h 37m (-22.2%)
  6. x86_64-gnu: 2h 19m -> 1h 49m (-21.2%)
  7. dist-powerpc64le-linux-musl: 1h 35m -> 1h 15m (-21.0%)
  8. dist-android: 22m 59s -> 27m 22s (+19.1%)
  9. dist-powerpc64le-linux-gnu: 1h 32m -> 1h 17m (-16.6%)
  10. test-various: 1h 46m -> 2h 2m (+14.9%)
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 (818811b): comparison URL.

Overall result: ❌✅ regressions and improvements - BENCHMARK(S) FAILED

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

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • runtime:nbody
  • runtime:text-search
  • runtime:svg
  • runtime:compression
  • runtime:raytracer
  • runtime:bufreader
  • runtime:fmt
  • runtime:parsing
  • runtime:css

❗ ❗ ❗ ❗ ❗

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.7% [0.1%, 1.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-1.3%, -0.3%] 10
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 2
All ❌✅ (primary) -0.5% [-1.3%, 1.3%] 12

Max RSS (memory usage)

Results (secondary 1.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)
1.9% [0.4%, 5.1%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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)
1.0% [0.8%, 1.2%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-2.2%, -0.5%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 494.817s -> 493.646s (-0.24%)
Artifact size: 394.41 MiB -> 394.40 MiB (-0.00%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants