Skip to content

Rollup of 9 pull requests#157329

Open
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-DyoIgRF
Open

Rollup of 9 pull requests#157329
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-DyoIgRF

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

taiki-e and others added 25 commits May 30, 2026 13:11
…c-macros, skipping fields based on whether or not they are used in error messages
…, r=jackh726

`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s

I was reading through `LivenessValues` and realised it had a lot of comments explaining that two `Option`s were mutually exclusive, plus some redundant logic to handle this.

This is a drive-by fix to use ~~an `Either`~~ a dedicated enum instead, which makes that property obvious from the code. It also removes the repeated logic.
…ochenkov

Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize

This fixes the perf regression in rust-lang#157076.
…tion, r=GuillaumeGomez,jhpratt,Urgau

rustdoc: Render `impl` restriction

According to the [Zulip conversation](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Documenting.20.60impl.60.20restrictions/with/598960498), this PR implements the rendering of `impl` restrictions.
Following the pattern used for `#[rustc_must_implement_one_of]`, this adds an information note saying, "This trait cannot be implemented outside \<crate-name\>".
When `--document-private-items` is passed, the note instead says, "This trait cannot be implemented outside \<path-to-module\>".
The screenshots show the generated documentation for the following code:
```rust
pub mod inner {
    pub impl(self) trait Bar {}
}
```
in a crate `c`. The latter image corresponds to the case where `--document-private-items` is passed.
Tracking issue: rust-lang#105077

r? @Urgau
cc @jhpratt

<img width="920" height="309" alt="screenshot" src="https://github.com/user-attachments/assets/586c97d6-0f41-41de-9673-eaf12b96c4a1" />
<img width="902" height="316" alt="document-private-screenshot" src="https://github.com/user-attachments/assets/56aedc38-bd05-4ece-885a-8d928a59089c" />
…thanBrouwer

Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros

Instead of having users to manually add `#[skip_arg]` for each field that is not used in fluent messages, I think it's better to instead let the proc-macro only call `diag.arg("name", field)` on the fields actually used.

r? @JonathanBrouwer
rustc_target: Use +spe for powerpcspe targets

LLVM does not infer this from the target name and `abi: "spe"` is just for cfg.  To actually generate the correct instructions for these targets (without `-C target-cpu`), we need to pass `+spe` to LLVM.

Fixes rust-lang#138960
See also rust-lang#157085
Related rust-lang#137860

cc @RalfJung
cc @BKPepe ([powerpc-unknown-linux-muslspe target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-linux-muslspe.html#target-maintainers))
cc @glaubitz (who added powerpc-unknown-linux-gnuspe in rust-lang#48484)
cc @biabbas @hax0kartik ([*-wrs-vxworks target maintainers](https://doc.rust-lang.org/nightly/rustc/platform-support/vxworks.html#target-maintainers))

@rustbot label +O-PowerPC +A-target-feature
…ng3, r=mejrs

Implement argument-dependent target checking for the `#[repr]` parser

Fixes some of rust-lang#156499
Fixes some of rust-lang#153101
Alternative approach to rust-lang#156569, which was suggested in the comments here: rust-lang#156569 (review)

How do you feel about this approach?
r? @mejrs
…mejrs

additional changes for issue-144595

- add spaces between the braces @ada4a
- remove `:` in the help message.
I learn this from estebank ("In the text we don't include a trailing :, unless we have a very specific reason. These messages can render in the terminal, in different ways, or in IDEs. Having a : can look out of place in some cases, specifically in rust-analyzer in VSCode is one of them.")
- suggest to use `::` for any colon encountered in tuple struct.
  So it now display help message for `std::string:String`. The same logic also appears in `parse_block_tail`, it suggest the user to use `::` when `parse_full_stmt` stops at a colon. So I think it's okay to make this change.

r? mejrs
…ouwer

Remove unnecessary arm in `handle_res`

Just nits found when reading the code
Add test for undefined EII static error

Meant to add this to rust-lang#156923, but pushed to the wrong branch.

r? @jdonszelmann
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 2, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 2, 2026
@rustbot rustbot added T-compiler Relevant to the compiler 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. labels Jun 2, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

📌 Commit 51c415a has been approved by JonathanBrouwer

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 Jun 2, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
@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 Jun 2, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

💔 Test for 71fe9bf failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
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 Jun 2, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
@rust-log-analyzer
Copy link
Copy Markdown
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)

@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 Jun 2, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

💔 Test for 8be9415 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
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 Jun 2, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

⌛ Testing commit 51c415a with merge d595fce...

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

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157035 (`LivenessValues`: use dedicated enum rather than mutually exclusive `Option`s)
 - #157182 (Restore simpler Encode/Decode impls for u32 and (on 64bit systems) usize)
 - #157310 (rustdoc: Render `impl` restriction)
 - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros)
 - #157137 (rustc_target: Use +spe for powerpcspe targets)
 - #157215 (Implement argument-dependent target checking for the `#[repr]` parser)
 - #157235 (additional changes for issue-144595)
 - #157321 (Remove unnecessary arm in `handle_res`)
 - #157324 (Add test for undefined EII static error)
@rust-log-analyzer
Copy link
Copy Markdown
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)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-compiler Relevant to the compiler 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants