Skip to content

Rollup of 4 pull requests#152200

Merged
rust-bors[bot] merged 52 commits intorust-lang:mainfrom
jieyouxu:rollup-UNFpgZy
Feb 6, 2026
Merged

Rollup of 4 pull requests#152200
rust-bors[bot] merged 52 commits intorust-lang:mainfrom
jieyouxu:rollup-UNFpgZy

Conversation

@jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Feb 6, 2026

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

eduardosm and others added 30 commits January 28, 2026 22:05
These don't correspond to specific instructions and will produce
different instructions on x86/x86_64 based on ABI details.
Otherwise this picks up vim .swp files.
It actually generates vrfin now
Update expected instructions for LLVM 22
Avoid `unsafe fn` in aarch64, powerpc and s390x tests
wasm: use `intrinsics::simd` for the narrow functions
powerpc: implement `vnmsubfp` using `intrinsics::simd`
x86: use `intrinsics::simd` for `hadds`/`hsubs`
This reverts commit 32146718741ee22ff0d54d21b9ab60353014c980.
When encountering a value that has a borrow checker error where the type was previously moved, when suggesting cloning verify that it is not already being derived. If it is, explain why the `derive(Clone)` doesn't apply:

```
note: if `TypedAddress<T>` implemented `Clone`, you could clone the value
  --> $DIR/derive-clone-implicit-bound.rs:6:1
   |
LL | #[derive(Clone, Copy)]
   |          ----- derived `Clone` adds implicit bounds on type parameters
LL | pub struct TypedAddress<T>{
   | ^^^^^^^^^^^^^^^^^^^^^^^^-^
   | |                       |
   | |                       introduces an implicit `T: Clone` bound
   | consider manually implementing `Clone` for this type
...
LL |         let old = self.return_value(offset);
   |                                     ------ you could clone this value
```
When encountering a bound coming from a derive macro, suggest manual impl of the trait.

Use the span for the specific param when adding bounds in builtin derive macros, so the diagnostic will point at them as well as the derive macro itself.

```
error[E0277]: can't compare `SomeNode` with `SomeNode`
  --> f29.rs:24:15
   |
24 |     accept_eq(&node);
   |     --------- ^^^^^ no implementation for `SomeNode == SomeNode`
   |     |
   |     required by a bound introduced by this call
   |
   = note: -Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:279:39
   = help: the trait `PartialEq` is not implemented for `SomeNode`
note: required for `Id<SomeNode>` to implement `PartialEq`
  --> f29.rs:3:10
   |
 3 | #[derive(PartialEq, Eq)]
   |          ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
 4 | pub struct Id<T>(PhantomData<T>);
   |               -
   = help: consider manually implementing `PartialEq` to avoid undesired bounds
note: required by a bound in `accept_eq`
  --> f29.rs:15:23
   |
15 | fn accept_eq(_: &impl PartialEq) { }
   |                       ^^^^^^^^^ required by this bound in `accept_eq`
help: consider annotating `SomeNode` with `#[derive(PartialEq)]`
   |
13 + #[derive(PartialEq)]
14 | struct SomeNode();
   |
```
```
note: required for `B<C>` to implement `Copy`
  --> $DIR/deriving-copyclone.rs:9:10
   |
LL | #[derive(Copy, Clone)]
   |          ^^^^ unsatisfied trait bound introduced in this `derive` macro
LL | struct B<T> {
   |          - would need to be `Copy`
```
… for derive

On type errors where the difference is expecting an owned type and getting a reference, if the expression is a `.clone()` call and the type is annotated with `#[derive(Clone)]`, we now explain implicit bounds and suggest manually implementing `Clone`.

```
error[E0308]: mismatched types
  --> $DIR/derive-implicit-bound-on-clone.rs:10:5
   |
LL | fn clone_me<T, K>(x: &ContainsRc<T, K>) -> ContainsRc<T, K> {
   |                                            ---------------- expected `ContainsRc<T, K>` because of return type
LL |     x.clone()
   |     ^^^^^^^^^ expected `ContainsRc<T, K>`, found `&ContainsRc<T, K>`
   |
   = note: expected struct `ContainsRc<_, _>`
           found reference `&ContainsRc<_, _>`
note: `ContainsRc<T, K>` does not implement `Clone`, so `&ContainsRc<T, K>` was cloned instead
  --> $DIR/derive-implicit-bound-on-clone.rs:10:5
   |
LL |     x.clone()
   |     ^
help: `Clone` is not implemented because the some trait bounds could not be satisfied
  --> $DIR/derive-implicit-bound-on-clone.rs:5:19
   |
LL | #[derive(Clone)]
   |          ----- in this derive macro expansion
LL | struct ContainsRc<T, K> {
   |                   ^  ^ derive introduces an implicit unsatisfied trait bound `K: Clone`
   |                   |
   |                   derive introduces an implicit unsatisfied trait bound `T: Clone`
   = help: consider manually implementing `Clone` to avoid the implict type parameter bounds
```
Provide more context on trait bounds being unmet due to imperfect derive

When encountering a value that has a borrow checker error where the type was previously moved, when suggesting cloning verify that it is not already being derived. If it is, explain why the `derive(Clone)` doesn't apply:

```
note: if `TypedAddress<T>` implemented `Clone`, you could clone the value
  --> $DIR/derive-clone-implicit-bound.rs:6:1
   |
LL | #[derive(Clone, Copy)]
   |          ----- derived `Clone` adds implicit bounds on type parameters
LL | pub struct TypedAddress<T>{
   | ^^^^^^^^^^^^^^^^^^^^^^^^-^
   | |                       |
   | |                       introduces an implicit `T: Clone` bound
   | consider manually implementing `Clone` for this type
...
LL |         let old = self.return_value(offset);
   |                                     ------ you could clone this value
```

When encountering a bound coming from a derive macro, suggest manual impl of the trait.

Use the span for the specific param when adding bounds in builtin derive macros, so the diagnostic will point at them as well as the derive macro itself.

```
note: required for `Id<SomeNode>` to implement `PartialEq`
  --> $DIR/derive-implicit-bound.rs:5:10
   |
LL | #[derive(PartialEq, Eq)]
   |          ^^^^^^^^^
LL | pub struct Id<T>(PhantomData<T>);
   |               - unsatisfied trait bound introduced in this `derive` macro
   = help: consider manually implementing `PartialEq` to avoid undesired bounds
```

Mention that the trait could be manually implemented in E0599.

Fix rust-lang#108894. Address rust-lang#143714. Address #rust-lang#146515 (but ideally would also suggest constraining the fn bound correctly as well).
…=jieyouxu

Remove the 4 failing tests from rustdoc-gui

These are the 4 tests that @Bryntet got to fail locally
See [#t-infra > CI failure because &rust-lang#96;tests/rustdoc-gui/search-filter.goml&rust-lang#96;](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20failure.20because.20.60tests.2Frustdoc-gui.2Fsearch-filter.2Egoml.60/with/572271674)

r? @ghost
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Feb 6, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 6, 2026
@jieyouxu
Copy link
Member Author

jieyouxu commented Feb 6, 2026

Small rollup to include #152194

@bors r+ rollup=never

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

📌 Commit 7afff45 has been approved by jieyouxu

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 Feb 6, 2026
@jieyouxu
Copy link
Member Author

jieyouxu commented Feb 6, 2026

Let's see...
@bors p=1000

@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 Feb 6, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

☀️ Test successful - CI
Approved by: jieyouxu
Duration: 3h 15m 15s
Pushing a3ceeeb to main...

@rust-bors rust-bors bot merged commit a3ceeeb into rust-lang:main Feb 6, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 6, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151278 Provide more context on trait bounds being unmet due to imp… 8e5c81e7eb324568ed08dde4a82836a8aeb6349e (link)
#151955 escape symbol names in global asm 7acd113579b1a2c93c2f7da3fe29313be58973b9 (link)
#152174 stdarch subtree update 37607ed080053facf996e566e8e2c1b630ab0c4c (link)
#152194 Remove the 4 failing tests from rustdoc-gui cca27353d2309ecd8872bb83047d07865a3b0884 (link)

previous master: f889772d65

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
Contributor

github-actions bot commented Feb 6, 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 f889772 (parent) -> a3ceeeb (this PR)

Test differences

Show 80 test diffs

Stage 1

  • [ui] tests/ui/asm/x86_64/global_asm_escape.rs: [missing] -> pass (J0)
  • [ui] tests/ui/asm/x86_64/naked_asm_escape.rs: [missing] -> pass (J0)
  • [ui] tests/ui/borrowck/derive-clone-implicit-bound.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/derive-implicit-bound-on-clone.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/derive-implicit-bound.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/borrowck/derive-clone-implicit-bound.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/derive-implicit-bound-on-clone.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/derive-implicit-bound.rs: [missing] -> pass (J1)
  • [ui] tests/ui/asm/x86_64/global_asm_escape.rs: [missing] -> ignore (gcc backend is marked as ignore) (J2)
  • [ui] tests/ui/asm/x86_64/naked_asm_escape.rs: [missing] -> ignore (gcc backend is marked as ignore) (J2)
  • [ui] tests/ui/asm/x86_64/global_asm_escape.rs: [missing] -> pass (J3)
  • [ui] tests/ui/asm/x86_64/naked_asm_escape.rs: [missing] -> pass (J3)
  • [ui] tests/ui/asm/x86_64/global_asm_escape.rs: [missing] -> ignore (only executed when the target is x86_64-unknown-linux-gnu) (J4)
  • [ui] tests/ui/asm/x86_64/naked_asm_escape.rs: [missing] -> ignore (only executed when the target is x86_64-unknown-linux-gnu) (J4)

Additionally, 66 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 a3ceeeb26c31eb15ace604890cef17d75a735ed2 --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-msvc: 1h 31m -> 1h 50m (+21.2%)
  2. x86_64-gnu-nopt: 2h 9m -> 2h 27m (+13.8%)
  3. aarch64-msvc-2: 1h 40m -> 1h 52m (+12.3%)
  4. aarch64-gnu: 2h 17m -> 2h 1m (-11.3%)
  5. aarch64-gnu-llvm-20-2: 54m 52s -> 49m 37s (-9.6%)
  6. dist-powerpc64-linux-musl: 1h 40m -> 1h 30m (-9.2%)
  7. dist-x86_64-msvc-alt: 2h 28m -> 2h 42m (+9.2%)
  8. dist-x86_64-illumos: 1h 45m -> 1h 36m (-8.7%)
  9. pr-check-2: 42m 5s -> 38m 34s (-8.4%)
  10. x86_64-gnu-llvm-21-1: 1h 12m -> 1h 18m (+8.0%)
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.

@jieyouxu jieyouxu deleted the rollup-UNFpgZy branch February 6, 2026 06:04
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a3ceeeb): comparison URL.

Overall result: ❌ regressions - 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.4%, 0.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.2%)

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

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

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.0% [0.0%, 0.0%] 22
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 22

Bootstrap: 472.84s -> 475.331s (0.53%)
Artifact size: 397.96 MiB -> 398.01 MiB (0.01%)

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. 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. 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.