Rollup of 13 pull requests#153665
Closed
JonathanBrouwer wants to merge 37 commits intorust-lang:mainfrom
Closed
Conversation
Clang and gcc use this option to control linking behavior too. Some targets need to be linked against a special crt which enables profiling at runtime. This makes using gprof a little easier with Rust binaries. Otherwise, rustc must be passed `-Clink-args=-pg` to ensure the correct startup code is linked.
`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.
It has 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`.
It's defined in `rustc_span::source_map` which doesn't make any sense because it has nothing to do with source maps. This commit moves it to the crate root, a more sensible spot for something this basic.
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).
Pass -pg to linker when using -Zinstrument-mcount This selects a slightly different crt on gnu targets which enables the profiler within glibc. This makes using gprof a little easier with Rust binaries. Otherwise, rustc must be passed `-Clink-args=-pg` to ensure the correct startup code is linked.
…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
Contributor
Contributor
Author
|
@bors p=1000 |
This comment has been minimized.
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`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #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) - #153479 (Add rationale for intentional potential_query_instability allows) - #153600 (add test for proc-macros with custom panic payloads) - #153641 (Move `Spanned`.) - #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)
Contributor
|
💔 Test for 4c9ec02 failed: CI. Failed job:
|
Contributor
Author
|
Maybe we get lucky and some of the try jobs survive? |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
Rollup of 13 pull requests try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1
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) |
Contributor
Author
|
@bors retry |
This comment has been minimized.
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`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #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) - #153479 (Add rationale for intentional potential_query_instability allows) - #153600 (add test for proc-macros with custom panic payloads) - #153641 (Move `Spanned`.) - #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)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 6a4e9d5 failed: CI. Failed job:
|
Merged
Contributor
|
PR #153641, which is a member of this rollup, was unapproved. |
Contributor
|
💔 Test for 1e3a819 failed: CI. Failed jobs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
&pin (mut|const) Tand&(mut) TwhenT: Unpin#149130 (Implement coercions between&pin (mut|const) Tand&(mut) TwhenT: Unpin)./x testto run tests without doc tests and without benchmarks #153143 (Allow./x testto run tests without doc tests and without benchmarks)ActiveJobGuard#153471 (RefactorActiveJobGuard)QueryLatchcleanups #153595 (QueryLatchcleanups)env!("CARGO_BIN_NAME")with itself #152302 (fix: don't suggest replacingenv!("CARGO_BIN_NAME")with itself)Spanned. #153641 (MoveSpanned.)r? @ghost
Create a similar rollup