Skip to content

Rollup of 13 pull requests#153672

Merged
rust-bors[bot] merged 38 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-I0JFK6s
Mar 11, 2026
Merged

Rollup of 13 pull requests#153672
rust-bors[bot] merged 38 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-I0JFK6s

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

ShE3py and others added 30 commits February 7, 2026 17:42
`ActiveJobGuard::complete` and `ActiveJobGuard::drop` have very similar
code, though non-essential structural differences obscure this a little.

This commit factors out the common code into a new method
`ActiveJobGuard::complete_inner`. It also inlines and remove
`expect_job`, which ends up having a single call site.
This commit moves the handling of the trivial "complete" case to the
top of the method. This avoids uselessly constructing a waiter in that
case. It also avoids the need for a separate block scope for `info`.
Use `coerce_to_pin_ref` and `coerce_pin_ref_to_ref` instead.
- `./x run generate-completions`
- Search and replace `--no-doc` with `--all-targets`
  This is to keep the behaviour the same.
- Document `./x test --tests` in `rustc-dev-guide`
- Add change info
Introduces a new check in `rustc_hir_analysis` enforcing that tuples of
scalable vectors should only up to eight vectors.
Renaming to remove any ambiguity as to what "vector" refers to in this
context
Renaming to remove any ambiguity as to what "vector" refers to in this
context.
I haven't worked in these areas for a little while, but happy to still be
pinged if someone wanted.
Synchronize which elements have code paths and which are unreachable betwen def collector and build reduced graph
…ackh726

Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`

This allows the following (mutual) coercions when `T: Unpin`:
- `&T` <-> `Pin<&T>`
- `&mut T` <-> `Pin<&mut T>`
- `&mut T` -> `Pin<&T>`
- `Pin<&mut T>` -> `&T`

Part of [Pin Ergonomics](rust-lang#130494).
…s, r=Mark-Simulacrum,kobzol

Allow `./x test` to run tests without doc tests and without benchmarks

# Problem

For Ferrocene we would like to run only the `coretests` and `alloctests` test suites when measuring code coverage. Running `corebenches` and `allocbenches` would alter the numbers, which is not compliant with the certification.

This is currently not possible in bootstrap. By default `./x test` runs unit, integration and doc tests. `./x test --doc` only runs doc tests. So far, so good.

The problem is that while `./x test --no-doc` stops bootstrap from executing doc tests, it surprisingly starts executing benchmarks (next to examples and bins as well). It basically behaves like `cargo test --all-targets`.

# Solution

This PR renames the existing `--no-doc` flag to `--all-targets` and keeps the same behaviour as before. Unfortunately it is not possible to internally switch from `cargo --bins --examples --tests --benches` to `cargo --all-targets` because it will fail e.g. `./x test library/alloc --all-targets` with an error like "use of unstable library feature `test`".

Additionally, this PR add a `./x test --tests` flag (equivalent to `cargo test --tests`) that only executes unit and integration tests.

Both changes we are doing in https://github.com/ferrocene/ferrocene anyways, but believe that they may be useful for other people as well and therefore would like to contribute them.

Note that this PR does _not_ change the behaviour of either `./x test` or `./x test --doc`.

## Note on `test = true`

While this change enables bootstrap to run tests without doc tests and without benchmarks, executing `./x test library/core library/alloc --tests` will still build and execute `corebenches` and `allocbenches`.

What?! 😱 Why all of this effort to enable it then?

Good question! The reason they are still executed is, that they are marked with `test = true` in their respective `Cargo.toml` ([corebenches](https://github.com/rust-lang/rust/blob/3f9853562c73af38a5e6af8b0da1b2734a327e19/library/coretests/Cargo.toml#L24), [allocbenches](https://github.com/rust-lang/rust/blob/3f9853562c73af38a5e6af8b0da1b2734a327e19/library/alloctests/Cargo.toml#L32)).

@bjorn3 mentioned that it is important for upstream that those benchmarks are executed by default, even if no `./x --all-targets` is passed. This is perfectly possible with this PR. Benchmarks marked with `test = true` will be executed when calling either of `./x test`, `./x test --tests` or `./x --all-targets`. Therefore this PR does not include a commit to change that. We will just do this change in https://github.com/ferrocene/ferrocene.

## Open questions

### Error message

I added one commit that adds an error message if a user passes `--no-doc` and points them to `--all-targets` and `--tests`. I think it might be nice to have, but if you think it is not necessary, I can remove it.

# How to test this change

You can see the change in action by running `./x test library/alloc --tests` and `./x test library/alloc --all-targets`. The first will execute `alloctests` and `allocbenches` (which is marked with `test = true`), while the second will additionally run `benches/vec_deque_append.rs` (which is _not_ marked with `test = true`).
…ochenkov

Refactor `ActiveJobGuard`

A few small improvements.

r? @petrochenkov
…=petrochenkov

`QueryLatch` cleanups

A couple of small improvements I found while reading through this code.

r? @petrochenkov
scalable vector: type renames and simple checks

Split out from rust-lang#153286

Per rust-lang#153286 (comment), renames `VectorKind` type to `SimdVectorKind` and `BackendRepr::ScalableVector` to `BackendRepr::SimdScalableVector`. Also adds a new check in `rustc_hir_analysis` enforcing that tuples of scalable vectors should only up to eight vectors.

r? @lqd
@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 10, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`)
 - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks)
 - #153471 (Refactor `ActiveJobGuard`)
 - #153595 (`QueryLatch` cleanups)
 - #153653 (scalable vector: type renames and simple checks)
 - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself)
 - #153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization)
 - #153479 (Add rationale for intentional potential_query_instability allows)
 - #153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous)
 - #153600 (add test for proc-macros with custom panic payloads)
 - #153643 (Avoid projection-only suggestions for inherent assoc types)
 - #153657 (triagebot: remove myself from some mention groups)
 - #153659 (Mark an unreachable match arm as such)
@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Mar 10, 2026

@bors treeopen
Github seems stable enough again for now 🤞

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 10, 2026

Tree is now open for merging.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 10, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 10, 2026

💔 Test for 404f81d failed: CI. Failed job:

@JonathanBrouwer
Copy link
Contributor Author

@bors retry

@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 Mar 10, 2026
@rust-bors rust-bors bot mentioned this pull request Mar 10, 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 Mar 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 14m 59s
Pushing b49ecc9 to main...

@rust-bors rust-bors bot merged commit b49ecc9 into rust-lang:main Mar 11, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 11, 2026
@github-actions
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 0c68443 (parent) -> b49ecc9 (this PR)

Test differences

Show 172 test diffs

Stage 0

  • tests::rkyv::test_rkyv_roundtrip: [missing] -> pass (J0)

Stage 1

  • [ui] tests/ui/associated-inherent-types/inherent-assoc-ty-mismatch-issue-153539.rs: [missing] -> pass (J0)
  • [ui] tests/ui/pin-ergonomics/pin-coercion-check.rs#normal: [missing] -> pass (J0)
  • [ui] tests/ui/pin-ergonomics/pin-coercion-check.rs#pin_ergonomics: [missing] -> pass (J0)
  • [ui] tests/ui/pin-ergonomics/pin-coercion.rs: [missing] -> pass (J0)
  • [ui] tests/ui/proc-macro/any-panic-payload.rs: [missing] -> pass (J0)
  • tests::rkyv::test_rkyv_roundtrip: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/associated-inherent-types/inherent-assoc-ty-mismatch-issue-153539.rs: [missing] -> pass (J1)
  • [ui] tests/ui/pin-ergonomics/pin-coercion-check.rs#normal: [missing] -> pass (J1)
  • [ui] tests/ui/pin-ergonomics/pin-coercion-check.rs#pin_ergonomics: [missing] -> pass (J1)
  • [ui] tests/ui/pin-ergonomics/pin-coercion.rs: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/any-panic-payload.rs: [missing] -> pass (J1)

Additionally, 160 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 b49ecc9eb70a51e89f32a7358e790f7b3808ccb3 --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. pr-check-1: 33m 54s -> 27m 46s (-18.1%)
  2. x86_64-gnu-debug: 2h 4m -> 1h 44m (-16.2%)
  3. aarch64-apple: 3h 11m -> 2h 44m (-14.2%)
  4. dist-i586-gnu-i586-i686-musl: 1h 24m -> 1h 35m (+12.7%)
  5. i686-gnu-2: 1h 43m -> 1h 30m (-12.7%)
  6. x86_64-gnu-aux: 2h 28m -> 2h 9m (-12.7%)
  7. arm-android: 1h 46m -> 1h 33m (-12.1%)
  8. pr-check-2: 44m 31s -> 39m 12s (-11.9%)
  9. x86_64-rust-for-linux: 50m 49s -> 45m 10s (-11.1%)
  10. dist-aarch64-llvm-mingw: 1h 34m -> 1h 44m (+10.6%)
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
#149130 Implement coercions between &pin (mut|const) T and `&(mut… 59484a8c8f57188e6983b79076d532a57a646494 (link)
#152302 fix: don't suggest replacing env!("CARGO_BIN_NAME") with … 92fe403c9ce1d811c6309e750a7fcad79b617fbb (link)
#153143 Allow ./x test to run tests without doc tests and without… 0a62fb554faea152a985c3c77732702e019dcf48 (link)
#153283 feat(rustdoc-json): Add optional support for rkyv (de)seria… 69b11eb15817e2b5039c991a2e0fecd65c9039eb (link)
#153471 Refactor ActiveJobGuard be54f9ba0a671f657c7075469aaaaaf38a251e35 (link)
#153479 Add rationale for intentional potential_query_instability a… 329076ca4fe54226c948c7199c13b123c93befd1 (link)
#153533 Fix LegacyKeyValueFormat report from docker build: miscella… e53e842caf9337f0c513c09e59870a9bcf210411 (link)
#153595 QueryLatch cleanups 8114683fd2e558c202275f1f2e7baa4842417494 (link)
#153600 add test for proc-macros with custom panic payloads db79b8650e8ac7d0cb1fe775040375e8f79d06bf (link)
#153643 Avoid projection-only suggestions for inherent assoc types 0a0719315e90b5d40106e39ed3e5585105934c3c (link)
#153653 scalable vector: type renames and simple checks abf547ff5b8ea0819f0dba983dc19c7ede7d16f3 (link)
#153657 triagebot: remove myself from some mention groups 59b7affa14510af6f4767d52e432f294c3839563 (link)
#153659 Mark an unreachable match arm as such 58acbeefd0fa03c2c7a9cbffe90c52fa826055b6 (link)

previous master: 0c68443b0a

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 (b49ecc9): 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.2% [0.1%, 0.4%] 10
Regressions ❌
(secondary)
0.3% [0.0%, 0.5%] 44
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.1%, 0.4%] 10

Max RSS (memory usage)

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

Cycles

Results (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)
- - 0
Regressions ❌
(secondary)
4.2% [3.8%, 4.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 480.034s -> 479.93s (-0.02%)
Artifact size: 394.90 MiB -> 396.95 MiB (0.52%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 11, 2026
Delta17920 pushed a commit to Delta17920/rust that referenced this pull request Mar 11, 2026
…nathanBrouwer

Rollup of 13 pull requests

Successful merges:

 - rust-lang#149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`)
 - rust-lang#153143 (Allow `./x test` to run tests without doc tests and without benchmarks)
 - rust-lang#153471 (Refactor `ActiveJobGuard`)
 - rust-lang#153595 (`QueryLatch` cleanups)
 - rust-lang#153653 (scalable vector: type renames and simple checks)
 - rust-lang#152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself)
 - rust-lang#153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization)
 - rust-lang#153479 (Add rationale for intentional potential_query_instability allows)
 - rust-lang#153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous)
 - rust-lang#153600 (add test for proc-macros with custom panic payloads)
 - rust-lang#153643 (Avoid projection-only suggestions for inherent assoc types)
 - rust-lang#153657 (triagebot: remove myself from some mention groups)
 - rust-lang#153659 (Mark an unreachable match arm as such)
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-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend 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 T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.