Skip to content

Rollup of 18 pull requests#155380

Open
jhpratt wants to merge 56 commits intorust-lang:mainfrom
jhpratt:rollup-j1e7DVL
Open

Rollup of 18 pull requests#155380
jhpratt wants to merge 56 commits intorust-lang:mainfrom
jhpratt:rollup-j1e7DVL

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented Apr 16, 2026

Successful merges:

r? @ghost

Create a similar rollup

hkBst and others added 30 commits January 27, 2026 13:00
Shaves off 368 bytes from the total size of all Unicode data tables.
This avoids having to add several unhelpful annotations when enabling
diagnostic checks for `cpass` and `rpass` revisions.
This allows warnings to be annotated, and verifies that no unexpected warnings
occur.
* Adds musl CVE fix to compiler section
* Removes Cargo section per feedback in the PR
`DroplessArena::alloc` already disallows ZST allocation.
`TypedArena::alloc` allows it but:
- (a) it's never used, and
- (b) writing to `NonNull::dangling()` seems dubious, even if the write
  is zero-sized.

This commit just changes it to panic on a ZST. This eliminates an
untested code path, and we shouldn't be allocating ZSTs anyway.
It also eliminates an unused ZST code path in `clear_last_chunk`.
Tests are also updated accordingly.
Co-authored-by: Josh Stone <cuviper@gmail.com>
This adds a `--quiet` flag to x.py and bootstrap to suppress some of the
output when compiling Rust. It conflicts with `--verbose`, matching the
behavior of `cargo` which does not allow `--verbose` and `--quiet`.

It works by passing quiet flags down to the underlying cargo, or LLVM
build processes. Note that for LLVM, we only can suppress logs when we
explicitly configure it with ninja. Otherwise we won't know what flag
to pass along to whichever build system cmake decides to use.

This can be helpful with AI workloads in the Rust codebase to help
shrink down the output to reduce token usage, which can help prevent
context pollution and lower costs.

This patch was partially generated with Gemini, but I've reviewed the
changes it made.
Co-authored-by: Josh Stone <cuviper@gmail.com>
jhpratt added 11 commits April 16, 2026 01:54
abort in core

Implements `core::process::abort_immediate` as a wrapper around `intrinsics::abort`.

- tracking issue: rust-lang#154601

(This PR used to also add `core::process::abort`, but that's been deferred to a later addition.)
Add `--quiet` flag to x.py and bootstrap to suppress output

This adds a `--quiet` flag to x.py and bootstrap to suppress some of the output when compiling Rust. It conflicts with `--verbose`, matching the behavior of `cargo` which does not allow `--verbose` and `--quiet`.

It works by passing quiet flags down to the underlying cargo, or LLVM build processes. Note that for LLVM, we only can suppress logs when we explicitly configure it with ninja. Otherwise we won't know what flag to pass along to whichever build system cmake decides to use.

This can be helpful with AI workloads in the Rust codebase to help shrink down the output to reduce token usage, which can help prevent context pollution and lower costs.

This patch was partially generated with Gemini, but I've reviewed the changes it made.
…hanBrouwer

Clean up `AttributeLintKind` and refactor diagnostic attribute linting

There was a fair amount of duplication here, and thanks to the proliferation of new diagnostic attributes these days, it was threatening to grow bigger.
Check diagnostic output in incremental `cpass` and `rpass` revisions

This allows compiler warnings to be annotated in `cpass` and `rpass` revisions, and verifies that no unexpected warnings occur.

---

My underlying motivation is that I want to be able to reduce or eliminate the confusing combination of `cfail` revisions with `//@ build-pass` directives, and replace them with a more straightforward `cpass` revision that also checks diagnostic output. That migration is not part of this PR.
…eyouxu

Adjust release notes for post-merge feedback

* Adds musl CVE fix to compiler section
* Removes Cargo section per feedback in the PR (rust-lang#155162 (comment))

cc @BoxyUwU (just FYI)
…a, r=Nadrieril

Disallow ZST allocations with `TypedArena`.

`DroplessArena::alloc` already disallows ZST allocation. `TypedArena::alloc` allows it but:
- (a) it's never used, and
- (b) writing to `NonNull::dangling()` seems dubious, even if the write is zero-sized.

This commit just changes it to panic on a ZST. This eliminates an untested code path, and we shouldn't be allocating ZSTs anyway. It also eliminates an unused ZST code path in `clear_last_chunk`.

r? @Nadrieril
…-literal, r=jhpratt

docs: Use `0b1` instead of `NonZero::MIN` in `NonZero::bit_width` doctests

This pull request updates the doctests for the `NonZero::bit_width` method. It replaces the use of the `NonZero::MIN` constant with an explicit binary literal `0b1`.

I think using `0b1` is more intuitive for illustrating the method's behavior than `NonZero::MIN`. Since other examples in the same doctests already use `0b111` and `0b1110`, this change brings the first example into alignment with the rest of the doctests.

I followed the existing pattern in the `NonZero::highest_one` and `NonZero::lowest_one` methods, which already use `0b1` in their doctests.

I also followed the convention of `uint::bit_width`, which uses the literal `0` instead of the `uint::MIN` constant in its doctests.
…ati865

Handle nonnull pattern types in size skeleton

The original comment was correct, the size is always the same, but we have more information now. In theory there was an additional bug that would have allowed transmuting things of different sizes, but I don't see how that would have been actually doable as the `tail` types would always have differed.

fixes rust-lang#155330
Add push_mut and new Layout methods to release notes

As recommended by @cuviper on Zulip, I'm making a direct PR to add this.
…_id, r=WaffleLapkin

remove calls to AliasTyKind::def_id

ref rust-lang#154941

I asked the LSP where `AliasTyKind::def_id` and then checked where the `AliasTyKind::def_id` was trivial to change. Could only find 2 places, and I am not sure about the `opaque_types.rs` (open to feedback!! :) ). All the others need refactoring or will end up with a logic as complex as `AliasTyKind::def_id`

This is the list checked:
- [X] compiler/rustc_borrowck/src/region_infer/opaque_types/member_constraints.rs — 1
- [X] compiler/rustc_borrowck/src/region_infer/opaque_types/mod.rs — 1
- [X] compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs — 5
- [X] compiler/rustc_hir_analysis/src/check/mod.rs — 1
- [X] compiler/rustc_infer/src/infer/outlives/for_liveness.rs — 2
- [X] compiler/rustc_infer/src/infer/outlives/obligations.rs — 1
- [X] compiler/rustc_infer/src/infer/outlives/verify.rs — 3
- [X] compiler/rustc_middle/src/ty/print/pretty.rs — 1
- [X] compiler/rustc_middle/src/ty/sty.rs — 1
- [X] compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs — 3
- [X] compiler/rustc_next_trait_solver/src/solve/effect_goals.rs — 3
- [X] compiler/rustc_pattern_analysis/src/rustc.rs — 1
- [X] compiler/rustc_public/src/unstable/convert/stable/ty.rs — 1
- [X] compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs — 2
- [X] compiler/rustc_trait_selection/src/error_reporting/infer/note_and_explain.rs — 4
- [X] compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs — 2
- [X] compiler/rustc_trait_selection/src/traits/effects.rs — 1
- [X] compiler/rustc_trait_selection/src/traits/query/normalize.rs — 1
- [X] compiler/rustc_ty_utils/src/opaque_types.rs — 7
- [X] compiler/rustc_ty_utils/src/ty.rs — 1
- [X] compiler/rustc_type_ir/src/outlives.rs — 1
- [X] compiler/rustc_type_ir/src/predicate.rs — 1
- [X] compiler/rustc_type_ir/src/relate.rs — 5
- [X] compiler/rustc_type_ir/src/ty_kind.rs — 2

r? @WaffleLapkin
…bilities, r=Kivooeo

Reduce diagnostic type visibilities.

Most diagnostic types are only used within their own crate, and so have a `pub(crate)` visibility. We have some diagnostic types that are unnecessarily `pub`. This is bad because (a) information hiding, and (b) if a `pub(crate)` type becomes unused the compiler will warn but it won't warn for a `pub` type.

This commit eliminates unnecessary `pub` visibilities for some diagnostic types, and also some related things due to knock-on effects. (I found these types with some ad hoc use of `grep`.)

r? @Kivooeo
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 16, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, 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. labels Apr 16, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented Apr 16, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 16, 2026

📌 Commit 92f6401 has been approved by jhpratt

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 Apr 16, 2026
@Zalathar
Copy link
Copy Markdown
Member

The queue is fairly long, so let's run a few try jobs in parallel while we're waiting.

@bors try jobs=x86_64-msvc-1,i686-msvc-1,x86_64-mingw-1,test-various,armhf-gnu,aarch64-apple

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 16, 2026

⌛ Trying commit 92f6401 with merge 4217ce0

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24507725351

rust-bors bot pushed a commit that referenced this pull request Apr 16, 2026
Rollup of 18 pull requests


try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
try-job: aarch64-apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, 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.