Skip to content

Rollup of 8 pull requests#157174

Merged
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-XgLtev4
May 31, 2026
Merged

Rollup of 8 pull requests#157174
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-XgLtev4

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

devnexen and others added 24 commits April 26, 2026 14:51
map io::Stdout/Stderr to Stdio::Inherit and File to a new InheritFile
variant returning io::Error from output() instead of aborting.
The `#[rustc_on_unimplemented]` note on `Debug` ("add `#[derive(Debug)]`
to `X` or manually `impl Debug for X`") duplicates the `consider
annotating X with #[derive(..)]` suggestion emitted by `suggest_derive`.

Skip the note when that suggestion will be shown, and keep it otherwise
so types whose derive can't be suggested (e.g. a field isn't `Debug`)
still get actionable guidance.
The condition is loop-invariant, so iterating the notes only to skip
every one wastes work. Test the derive suggestion once and skip the
whole loop when it will be shown.
net tests: let the OS pick the port numbers

This finishes what I started in rust-lang#156385.
Fixes rust-lang#156377.
…-note-on-unimplemented, r=estebank

Avoid redundant note when a #[derive] is already suggested

Fixes rust-lang#157118

The `Debug` `#[rustc_on_unimplemented]` note ("add `#[derive(Debug)]` to `X` or manually `impl Debug for X`") just repeats the `consider annotating X with #[derive(..)]` suggestion that `suggest_derive` already emits, so on these bound errors it's pure noise.

Now the note only gets dropped when that suggestion will actually show, which is whenever `can_suggest_derive` holds: a crate-local ADT, not a union, with every field already implementing the trait. Deleting the note from the attribute outright would be too blunt, since when `can_suggest_derive` is false there's no suggestion and the note is the only hint the user gets. A crate-local struct with a non-`Debug` field still ends up with just:

```
error[E0277]: `Outer` doesn't implement `Debug`
   = note: add `#[derive(Debug)]` to `Outer` or manually `impl Debug for Outer`
```

Same story when `main_trait_predicate != leaf_trait_predicate`, since the note comes from the main predicate and the suggestion from the leaf.
std::process: uefi: avoid panicking in Stdio From impls.

map io::Stdout/Stderr to Stdio::Inherit and File to a new InheritFile variant returning io::Error from output() instead of aborting.
…nts, r=jhpratt

Migrate libraries from ptr::slice_from_raw_parts to .cast_slice

Tracking issue for `#![feature(ptr_cast_slice)]`: rust-lang#149103
This commit updates most callsites of ptr::slice_from_raw_parts within ./library to the more concise but unstable postfix `.cast_slice()` method on raw pointers, using the `ptr_cast_slice` feature. Some tests in alloctests have also been updated.

No functional change, debatably improved readability.
elaborate_drop: Avoid as_mut.unwrap dance, empty vectors are cheap.

Nit I found while working on rust-lang#156649
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 30, 2026
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide O-SGX Target: SGX 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. labels May 30, 2026
@rustbot rustbot added 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 30, 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 30, 2026

📌 Commit d662f5a 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 May 30, 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 31, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 31, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 13m
Pushing e248841 to main...

@rust-bors rust-bors Bot merged commit e248841 into rust-lang:main May 31, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 31, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151690 std: Refactor env::var function aa8fa07e7db6bd83436e2e7f911df27b4428a9f4 (link)
#155826 std::process: uefi: avoid panicking in Stdio From impls. 57f8f1a5a2dc145322a93f2ac57ccb02c8d8e93d (link)
#156109 Migrate libraries from ptr::slice_from_raw_parts to .cast_s… d520a689af59d5dd04a2b49c6390c87a26e81154 (link)
#156642 offload_kernel macro expansion 7f30f6aa709b1d18d42e20e455f18263156d4ff8 (link)
#156823 Add regression test d9beba31c9a51334b93c7d976e37999e9de3ef3c (link)
#157006 net tests: let the OS pick the port numbers 96b2c248225ff853341e1bd0cc0d241d30545abe (link)
#157126 Avoid redundant note when a #[derive] is already suggested 8b70f6adb2a181ad19035513215d95e71723204b (link)
#157162 elaborate_drop: Avoid as_mut.unwrap dance, empty vectors ar… 885385b65b18a348bf77bf10111a26985b93314b (link)

previous master: f8a08b688c

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 f8a08b6 (parent) -> e248841 (this PR)

Test differences

Show 1078 test diffs

Stage 1

  • net::udp::tests::socket_and_peer_name: [missing] -> pass (J1)
  • net::udp::tests::socket_name: pass -> [missing] (J1)
  • net::udp::tests::socket_peer: pass -> [missing] (J1)
  • [pretty] tests/pretty/offload/offload_kernel.rs#device: [missing] -> pass (J2)
  • [pretty] tests/pretty/offload/offload_kernel.rs#host: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs: [missing] -> pass (J2)
  • [ui] tests/ui/derives/redundant-derive-note-on-unimplemented.rs: [missing] -> pass (J2)

Stage 2

  • [pretty] tests/pretty/offload/offload_kernel.rs#device: [missing] -> pass (J0)
  • [pretty] tests/pretty/offload/offload_kernel.rs#host: [missing] -> pass (J0)
  • [ui] tests/ui/derives/redundant-derive-note-on-unimplemented.rs: [missing] -> pass (J3)
  • net::udp::tests::socket_and_peer_name: [missing] -> pass (J4)
  • net::udp::tests::socket_name: pass -> [missing] (J4)
  • net::udp::tests::socket_peer: pass -> [missing] (J4)
  • [rustdoc-html] tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs: [missing] -> pass (J5)
  • [pretty] tests/pretty/offload/offload_kernel.rs#device: [missing] -> ignore (only executed when the release channel is nightly) (J6)
  • [pretty] tests/pretty/offload/offload_kernel.rs#host: [missing] -> ignore (only executed when the release channel is nightly) (J6)

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

Job group index

  • J0: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-21-1, aarch64-msvc-1, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, optional-x86_64-gnu-parallel-frontend, x86_64-gnu, x86_64-gnu-gcc, x86_64-gnu-llvm-21-2, x86_64-gnu-llvm-22-2, x86_64-gnu-nopt, x86_64-mingw-1, x86_64-msvc-1
  • J1: i686-gnu-nopt-2, pr-check-2, x86_64-gnu-llvm-21-3, x86_64-gnu-llvm-22-3, x86_64-gnu-nopt
  • J2: x86_64-gnu-llvm-21-3, x86_64-gnu-llvm-22-3
  • J3: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-21-1, aarch64-msvc-1, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, optional-x86_64-gnu-parallel-frontend, test-various, x86_64-gnu, x86_64-gnu-debug, x86_64-gnu-gcc, x86_64-gnu-llvm-21, x86_64-gnu-llvm-21-2, x86_64-gnu-llvm-22-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J4: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-21-1, aarch64-msvc-1, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, optional-x86_64-gnu-parallel-frontend, test-various, x86_64-gnu, x86_64-gnu-llvm-21-2, x86_64-gnu-llvm-22-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J5: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-21-1, aarch64-msvc-1, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, optional-x86_64-gnu-parallel-frontend, x86_64-gnu, x86_64-gnu-llvm-21-2, x86_64-gnu-llvm-22-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J6: x86_64-gnu-stable
Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e24884124e48f2a2e83f165c3de7ae723fd9c87b --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-x86_64-llvm-mingw: 1h 58m -> 1h 11m (-39.4%)
  2. x86_64-gnu-miri: 1h 12m -> 1h 40m (+39.0%)
  3. i686-msvc-2: 1h 39m -> 2h 16m (+38.0%)
  4. i686-gnu-nopt-2: 1h 47m -> 2h 23m (+34.3%)
  5. x86_64-gnu-llvm-21-2: 1h 14m -> 1h 37m (+29.9%)
  6. dist-x86_64-mingw: 2h 3m -> 2h 33m (+23.7%)
  7. dist-ohos-x86_64: 1h 19m -> 1h 2m (-21.0%)
  8. dist-loongarch64-musl: 1h 49m -> 1h 26m (-20.7%)
  9. x86_64-msvc-ext1: 2h 8m -> 1h 42m (-20.2%)
  10. pr-check-1: 33m 46s -> 27m 15s (-19.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-log-analyzer
Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  COMMIT_MESSAGE: cargo update 
##[endgroup]
Downloading single artifact
Preparing to download the following artifacts:
- Cargo-lock (ID: 7312600919, Size: 51275, Expected Digest: sha256:c0008a7c9730a64b1a14518eaebfec6477f04d695c3fa7c89e78c0da5c8a6b86)
Redirecting to blob download url: https://productionresultssa17.blob.core.windows.net/actions-results/a1ce29f7-c46c-48d5-853b-2810f44423cd/workflow-job-run-3579c8fd-64a7-5656-9b66-20f87d69bd1f/artifacts/858175980ba8726bab9f963fd06060d5199d874bbd735e523e2d990d354f8c0b.zip
Starting download of artifact to: /home/runner/work/rust/rust
(node:2254) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
SHA256 digest of downloaded artifact is c0008a7c9730a64b1a14518eaebfec6477f04d695c3fa7c89e78c0da5c8a6b86
Artifact download completed successfully.
Total of 1 artifact(s) downloaded
Download artifact has finished successfully
---
  COMMIT_MESSAGE: cargo update 
##[endgroup]
Downloading single artifact
Preparing to download the following artifacts:
- cargo-updates (ID: 7312600985, Size: 2275, Expected Digest: sha256:4161eefb6d430dc34943fb508da5d9894964d5c3a0a131f930935b0f38d0f3d1)
Redirecting to blob download url: https://productionresultssa17.blob.core.windows.net/actions-results/a1ce29f7-c46c-48d5-853b-2810f44423cd/workflow-job-run-3579c8fd-64a7-5656-9b66-20f87d69bd1f/artifacts/ce9034d4568b3430f906da1368ae1cf3e14ef1542859eb2e8d635c0876371f53.zip
Starting download of artifact to: /home/runner/work/rust/rust
(node:2265) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
SHA256 digest of downloaded artifact is 4161eefb6d430dc34943fb508da5d9894964d5c3a0a131f930935b0f38d0f3d1
Artifact download completed successfully.
Total of 1 artifact(s) downloaded
Download artifact has finished successfully
##[group]Run echo "${COMMIT_MESSAGE}" > commit.txt
echo "${COMMIT_MESSAGE}" > commit.txt
cat cargo_update.log >> commit.txt

echo "${PR_MESSAGE}" > body.md
echo '```txt' >> body.md
cat cargo_update.log >> body.md
echo '```' >> body.md
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
dep-bumps
following is the output from `cargo update`:
  COMMIT_MESSAGE: cargo update 
##[endgroup]
##[group]Run git config user.name github-actions
git config user.name github-actions
git config user.email github-actions@github.com
git switch --force-create cargo_update
git add ./Cargo.lock ./library/Cargo.lock ./src/tools/rustbook/Cargo.lock
git commit --no-verify --file=commit.txt
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
dep-bumps
following is the output from `cargo update`:
  COMMIT_MESSAGE: cargo update 
##[endgroup]
remote: error: GH013: Repository rule violations found for refs/heads/cargo_update.        
remote: Review all repository rules at https://github.com/rust-lang/rust/rules?ref=refs%2Fheads%2Fcargo_update        
remote: 
remote: - Cannot update this protected ref.        
remote: 
remote: - Changes must be made through a pull request.        
remote: 
remote: - Cannot force-push to this branch        
remote: 
To https://github.com/rust-lang/rust
 ! [remote rejected]   cargo_update -> cargo_update (push declined due to repository rule violations)
error: failed to push some refs to 'https://github.com/rust-lang/rust'
##[error]Process completed with exit code 1.
Post job cleanup.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e248841): comparison URL.

Overall result: ❌✅ regressions and 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.4% [0.1%, 0.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.1%, 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)
2.5% [2.0%, 3.2%] 3
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-2.6% [-5.7%, -0.7%] 3
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Cycles

Results (primary 3.2%, secondary -3.2%)

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

mean range count
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-4.5%, -2.1%] 4
All ❌✅ (primary) 3.2% [3.2%, 3.2%] 1

Binary size

Results (primary 0.1%, 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.2%] 15
Regressions ❌
(secondary)
0.1% [0.1%, 0.3%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.2%] 15

Bootstrap: 511.354s -> 511.377s (0.00%)
Artifact size: 400.80 MiB -> 400.74 MiB (-0.02%)

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

Labels

A-rustc-dev-guide Area: rustc-dev-guide merged-by-bors This PR was explicitly merged by bors. O-SGX Target: SGX 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-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.