Skip to content

Rollup of 11 pull requests #143888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jul 13, 2025
Merged

Rollup of 11 pull requests #143888

merged 29 commits into from
Jul 13, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 13, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nia-e and others added 29 commits July 10, 2025 16:33
This reduces the amount of time it takes to do the x check for
rust-analyzer analysis from 12m16s to 3m34s when the bootstrap compiler
is already downloaded.
If CI_JOB_NAME is not specified, it's supposed to fall back to
the image name, which is `$image`, not `$IMAGE`.

Failing to set the correct CI_JOB_NAME causes failures when running
`dist-ohos-*` images locally.
Additionally, remove unused `tests/ui/auxiliary/svh-*` crates that are duplicates of `tests/ui/svh/auxiliary/svh-*`.
`tests/ui`: A New Order [26/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895.

r? ````@tgross35````
…ems, r=petrochenkov

Check assoc consts and tys later like assoc fns

This PR
1. checks assoc consts and tys later like assoc fns
2. marks assoc consts appear in poly-trait-ref live

For assoc consts, considering
```rust
#![deny(dead_code)]

trait Tr { // ERROR trait `Tr` is never used
    const I: Self;
}

struct Foo; //~ ERROR struct `Foo` is never constructed

impl Tr for Foo {
    const I: Self = Foo;
}

fn main() {}
```

Current this will produce unused `I` instead of unused `Tr` and `Foo` ([play](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=e0490d4a2d522cb70437b26e514a3d9c)), because `const I: Self = Foo;` will be added into the worklist at first:
```
error: associated constant `I` is never used
 --> src/main.rs:4:11
  |
3 | trait Tr { // ERROR trait `Tr` is never used
  |       -- associated constant in this trait
4 |     const I: Self;
  |           ^
  |
note: the lint level is defined here
 --> src/main.rs:1:9
  |
1 | #![deny(dead_code)]
  |         ^^^^^^^^^

error: could not compile `playground` (bin "playground") due to 1 previous error
```

This also happens to assoc tys, see the [new test](https://github.com/rust-lang/rust/compare/master...mu001999-contrib:rust:dead-code/impl-items?expand=1#diff-bf45fa403934a31c9d610a073ed2603d885e7e81572e8edf38b7f4e08a1f3531)

Fixes rust-lang#126729

r? `````@petrochenkov`````
…ieu,tgross35

slice: Mark `rotate_left`, `rotate_right` unstably const

Tracking issue rust-lang#143812

- Add the const unstable `const_slice_rotate` feature
- Mark `<[T]>::rotate_left` and `<[T]>::rotate_right` as const unstable

The internal rotate functions use [`<*mut T>::replace`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.replace) and [`ptr::swap_nonoverlapping`](https://doc.rust-lang.org/stable/core/ptr/fn.swap_nonoverlapping.html) which were const-stabilized in 1.88.

Two changes were needed in the `rotate.rs` module to make these functions const:
1. A usage of `cmp::min` was replaced with a local function implementation of [`Ord::min`](https://doc.rust-lang.org/1.88.0/src/core/cmp.rs.html#1048-1053).
2. A `for start in 1..gcd` loop was changed to a while loop with an increment variable.

This needs libs-api approval and cc-ing const-eval.
interpret/allocation: expose init + write_wildcards on a range

Part of rust-lang/miri#4456, so that we can mark down when a foreign access to our memory happened. Should this also move `prepare_for_native_access()` itself into Miri, given that everything there can be implemented on Miri's side?

r? `````@RalfJung`````
…ings, r=petrochenkov

Resolve: merge `source_bindings` and `target_bindings` into `bindings`

Attempts to merge the 2 fields `source_bindings` and `target_bindings` of `ImportKind::Single` into 1 field called `bindings`.

r? ````@petrochenkov````
…resolution-bindings, r=petrochenkov

Refactor resolve resolution bindings

This pr does the work asked in rust-lang#142547 (comment). This part:

> move the `(non)_glob_binding` change

r? ````@petrochenkov````
constify `From` and `Into`

tracking issue rust-lang#143773

r? ``````@fee1-dead``````

I did not mark any impls elsewhere as `const`, those can happen on their own timeframe and don't need to be part of this MVP. But if there are some core ones you think should be in there I'll happily add them, just couldn't think of any
…d, r=Kobzol

Add --compile-time-deps argument for x check

Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.
…oieni

Fix fallback for CI_JOB_NAME

If CI_JOB_NAME is not specified, it's supposed to fall back to the image name, which is `$image`, not `$IMAGE`.

Failing to set the correct CI_JOB_NAME causes failures when running `dist-ohos-*` images locally.
clippy: fix test filtering when TESTNAME is empty

Fixes rust-lang#143824. Turns out bootstrap was just fine, the TESTNAME logic in clippy was wrong... I still made this a rustc PR as that's where I did all the debugging.

The bootstrap change is not really related, but it's comment-only so not worth a separate PR... adding the `test_args` is also part of what `prepare_cargo_test` would usually do so let's group the code properly.
…trace, r=Kobzol

Fix command trace

With the recent developments in centralization of command execution, we somehow broke the traces for command execution. This PR fixes that and add trace to stream command execution as well.

r? ````@Kobzol````
@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Jul 13, 2025
@rustbot rustbot added the rollup A PR which is a rollup label Jul 13, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 13, 2025

📌 Commit 3ff549f has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Jul 13, 2025
@bors
Copy link
Collaborator

bors commented Jul 13, 2025

⌛ Testing commit 3ff549f with merge 56835d7...

@bors
Copy link
Collaborator

bors commented Jul 13, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 56835d7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 13, 2025
@bors bors merged commit 56835d7 into rust-lang:master Jul 13, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 13, 2025
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 7e310f4 (parent) -> 56835d7 (this PR)

Test differences

Show 194 test diffs

Stage 1

  • [ui] tests/ui/associated-consts/equality-unused-issue-126729.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/super-let-lifetime-and-drop.rs#borrowck: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/super-let-lifetime-and-drop.rs#runtime: [missing] -> pass (J1)
  • [ui] tests/ui/cast/cast-enum-to-primitive-error.rs: [missing] -> pass (J1)
  • [ui] tests/ui/cast/coercion-as-explicit-cast.rs: [missing] -> pass (J1)
  • [ui] tests/ui/generics/generic-enum-errors.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/dead-code/unused-trait-with-assoc-const.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/dead-code/unused-trait-with-assoc-ty.rs: [missing] -> pass (J1)
  • [ui] tests/ui/modules/module-super-access.rs: [missing] -> pass (J1)
  • [ui] tests/ui/modules/super-at-crate-root.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/syntactic-trailing-commas.rs: [missing] -> pass (J1)
  • [ui] tests/ui/ptr_ops/ptr-swap-basic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs: [missing] -> pass (J1)
  • [ui] tests/ui/recursion/recursion-tail-call-no-arg-leak.rs: [missing] -> pass (J1)
  • [ui] tests/ui/recursion/recursion-tail-cps.rs: [missing] -> pass (J1)
  • [ui] tests/ui/super-at-top-level.rs: pass -> [missing] (J1)
  • [ui] tests/ui/super-let.rs#borrowck: pass -> [missing] (J1)
  • [ui] tests/ui/super-let.rs#runtime: pass -> [missing] (J1)
  • [ui] tests/ui/super.rs: pass -> [missing] (J1)
  • [ui] tests/ui/svh-add-nothing.rs: pass -> [missing] (J1)
  • [ui] tests/ui/svh/svh-no-api-change-no-recompile.rs: [missing] -> pass (J1)
  • [ui] tests/ui/swap-1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/swap-overlapping.rs: pass -> [missing] (J1)
  • [ui] tests/ui/switched-expectations.rs: pass -> [missing] (J1)
  • [ui] tests/ui/tag-type-args.rs: pass -> [missing] (J1)
  • [ui] tests/ui/tag-variant-cast-non-nullary.rs: pass -> [missing] (J1)
  • [ui] tests/ui/tail-call-arg-leak.rs: pass -> [missing] (J1)
  • [ui] tests/ui/tail-cps.rs: pass -> [missing] (J1)
  • [ui] tests/ui/tail-typeck.rs: pass -> [missing] (J1)
  • [ui] tests/ui/trailing-comma.rs: pass -> [missing] (J1)
  • [ui] tests/ui/trait-method-number-parameters.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/trait-method-signature-mismatch.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/tryfrominterror-result-comparison.rs: [missing] -> pass (J1)
  • [ui] tests/ui/transmute-equal-assoc-types.rs: pass -> [missing] (J1)
  • [ui] tests/ui/transmute-non-immediate-to-immediate.rs: pass -> [missing] (J1)
  • [ui] tests/ui/transmute/transmute-array-to-scalar.rs: [missing] -> pass (J1)
  • [ui] tests/ui/transmute/transmute-same-associated-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/trivial_casts-rpass.rs: pass -> [missing] (J1)
  • [ui] tests/ui/try-from-int-error-partial-eq.rs: pass -> [missing] (J1)
  • [ui] tests/ui/typeck/mismatched-types-ref-binding.rs: [missing] -> pass (J1)
  • [ui] tests/ui/typeck/tail-return-type-mismatch.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/associated-consts/equality-unused-issue-126729.rs: [missing] -> pass (J0)
  • [ui] tests/ui/borrowck/super-let-lifetime-and-drop.rs#borrowck: [missing] -> pass (J0)
  • [ui] tests/ui/borrowck/super-let-lifetime-and-drop.rs#runtime: [missing] -> pass (J0)
  • [ui] tests/ui/cast/cast-enum-to-primitive-error.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cast/coercion-as-explicit-cast.rs: [missing] -> pass (J0)
  • [ui] tests/ui/generics/generic-enum-errors.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/dead-code/unused-trait-with-assoc-const.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/dead-code/unused-trait-with-assoc-ty.rs: [missing] -> pass (J0)
  • [ui] tests/ui/modules/module-super-access.rs: [missing] -> pass (J0)
  • [ui] tests/ui/modules/super-at-crate-root.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/syntactic-trailing-commas.rs: [missing] -> pass (J0)
  • [ui] tests/ui/ptr_ops/ptr-swap-basic.rs: [missing] -> pass (J0)
  • [ui] tests/ui/ptr_ops/ptr-swap-overlapping-regions.rs: [missing] -> pass (J0)
  • [ui] tests/ui/recursion/recursion-tail-call-no-arg-leak.rs: [missing] -> pass (J0)
  • [ui] tests/ui/recursion/recursion-tail-cps.rs: [missing] -> pass (J0)
  • [ui] tests/ui/super-at-top-level.rs: pass -> [missing] (J0)
  • [ui] tests/ui/super-let.rs#borrowck: pass -> [missing] (J0)
  • [ui] tests/ui/super-let.rs#runtime: pass -> [missing] (J0)
  • [ui] tests/ui/super.rs: pass -> [missing] (J0)
  • [ui] tests/ui/svh-add-nothing.rs: pass -> [missing] (J0)
  • [ui] tests/ui/svh/svh-no-api-change-no-recompile.rs: [missing] -> pass (J0)
  • [ui] tests/ui/swap-1.rs: pass -> [missing] (J0)
  • [ui] tests/ui/swap-overlapping.rs: pass -> [missing] (J0)
  • [ui] tests/ui/switched-expectations.rs: pass -> [missing] (J0)
  • [ui] tests/ui/tag-type-args.rs: pass -> [missing] (J0)
  • [ui] tests/ui/tag-variant-cast-non-nullary.rs: pass -> [missing] (J0)
  • [ui] tests/ui/tail-call-arg-leak.rs: pass -> [missing] (J0)
  • [ui] tests/ui/tail-cps.rs: pass -> [missing] (J0)
  • [ui] tests/ui/tail-typeck.rs: pass -> [missing] (J0)
  • [ui] tests/ui/trailing-comma.rs: pass -> [missing] (J0)
  • [ui] tests/ui/trait-method-number-parameters.rs: pass -> [missing] (J0)
  • [ui] tests/ui/traits/trait-method-signature-mismatch.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/tryfrominterror-result-comparison.rs: [missing] -> pass (J0)
  • [ui] tests/ui/transmute-equal-assoc-types.rs: pass -> [missing] (J0)
  • [ui] tests/ui/transmute-non-immediate-to-immediate.rs: pass -> [missing] (J0)
  • [ui] tests/ui/transmute/transmute-array-to-scalar.rs: [missing] -> pass (J0)
  • [ui] tests/ui/transmute/transmute-same-associated-type.rs: [missing] -> pass (J0)
  • [ui] tests/ui/trivial_casts-rpass.rs: pass -> [missing] (J0)
  • [ui] tests/ui/try-from-int-error-partial-eq.rs: pass -> [missing] (J0)
  • [ui] tests/ui/typeck/mismatched-types-ref-binding.rs: [missing] -> pass (J0)
  • [ui] tests/ui/typeck/tail-return-type-mismatch.rs: [missing] -> pass (J0)

Additionally, 112 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 56835d7ac14da9f966e1ff39fd9ffd2e29b764d1 --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-linux: 8136.3s -> 5884.9s (-27.7%)
  2. dist-apple-various: 5729.5s -> 6961.7s (21.5%)
  3. x86_64-rust-for-linux: 2518.2s -> 2968.5s (17.9%)
  4. pr-check-2: 2219.3s -> 2608.4s (17.5%)
  5. pr-check-1: 1499.9s -> 1753.5s (16.9%)
  6. dist-aarch64-apple: 4832.1s -> 5566.6s (15.2%)
  7. x86_64-apple-2: 4295.4s -> 4845.3s (12.8%)
  8. i686-gnu-2: 5439.2s -> 6038.0s (11.0%)
  9. x86_64-gnu-llvm-19-1: 3331.2s -> 3694.0s (10.9%)
  10. arm-android: 5887.5s -> 6378.0s (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
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143301 tests/ui: A New Order [26/N] cc6f9a4f1c437c02fcaff182aaab53efaa8d5c8b (link)
#143519 Check assoc consts and tys later like assoc fns eca1577d274fa023ef5db02d9c7a432325b11781 (link)
#143554 slice: Mark rotate_left, rotate_right unstably const c014e31ae3fc06bd0bd0af4c309a924e3bbf7ebd (link)
#143634 interpret/allocation: expose init + write_wildcards on a ra… ad23b6346fda65100b71237a370902d2574db382 (link)
#143685 Resolve: merge source_bindings and target_bindings into… cb87a244088404e23f3fdc6fd4d87fe5de64a3d5 (link)
#143734 Refactor resolve resolution bindings 5af0d5caa44ff76c05ec09b3c4122eb115a33b67 (link)
#143774 constify From and Into 5344c98bb2f180d21721dc9e1020cd40411b3749 (link)
#143785 Add --compile-time-deps argument for x check c2e70f0ab873b422ab0d0127c1d0e65917028f0e (link)
#143786 Fix fallback for CI_JOB_NAME 02ccb8e7f7a4a0874c88e22ae23ebc6715e9b93f (link)
#143825 clippy: fix test filtering when TESTNAME is empty 8d3a8594b2ffdf729bfd6e80d15604cfc94fe526 (link)
#143826 Fix command trace 351d616f638702fc472b9aded90792eab02444ef (link)

previous master: 7e310f4b9a

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (56835d7): comparison URL.

Overall result: ❌ regressions - please read the text below

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.4% [0.1%, 0.8%] 15
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.1%, 0.8%] 15

Max RSS (memory usage)

Results (primary -0.4%, secondary -2.2%)

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

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

Cycles

Results (primary -0.3%, secondary -5.6%)

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)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-5.6% [-5.6%, -5.6%] 1
All ❌✅ (primary) -0.3% [-2.7%, 2.2%] 2

Binary size

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

Bootstrap: 465.776s -> 465.532s (-0.05%)
Artifact size: 374.73 MiB -> 374.73 MiB (-0.00%)

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. 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. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-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.