Rollup of 7 pull requests#157325
Closed
JonathanBrouwer wants to merge 17 commits into
Closed
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
…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
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
Rollup of 7 pull requests try-job: dist-various-1 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 try-job: i686-msvc-2
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
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)handle_res#157321 (Remove unnecessary arm inhandle_res)r? @ghost
Create a similar rollup