Rollup of 9 pull requests#157329
Open
JonathanBrouwer wants to merge 25 commits into
Open
Conversation
…c-macros, skipping fields based on whether or not they are used in error messages
…agnostics/message.rs`
…, 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
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
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)
Contributor
|
💔 Test for 71fe9bf failed: CI. Failed job:
|
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
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)
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
|
💔 Test for 8be9415 failed: CI. Failed job:
|
Contributor
Author
|
@bors retry |
Contributor
|
⌛ 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)
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) |
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:
LivenessValues: use dedicated enum rather than mutually exclusiveOptions #157035 (LivenessValues: use dedicated enum rather than mutually exclusiveOptions)implrestriction #157310 (rustdoc: Renderimplrestriction)skip_argattribute fromDiagnosticandSubdiagnosticproc-macros #157070 (Removeskip_argattribute fromDiagnosticandSubdiagnosticproc-macros)#[repr]parser #157215 (Implement argument-dependent target checking for the#[repr]parser)handle_res#157321 (Remove unnecessary arm inhandle_res)r? @ghost
Create a similar rollup