Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Feb 3, 2026

For #151366 (comment)

r? @jdonszelmann (or anyone else who feels like it)

@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

rustc_macros::diagnostics was changed

cc @davidtwco, @TaKO8Ki

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 3, 2026
}
Message::Inline(message_span, message) => {
verify_fluent_message(*message_span, &message, variant);
if let Some(variant) = variant {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite get why this had to change to an option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an edgecase I missed in the initial implementation.
Subdiagnostics can use variables from their parent. Because the #[derive(Subdiagnostic)] cannot see the parent diagnostic, we can't always verify the variables in the subdiagnostic

For example: https://github.com/rust-lang/rust/pull/152041/changes#diff-cd9aee6d8730bdbb5caab22a0b1a07d44c4b64f7e65fc55b044bca9903eeb081R15

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@jdonszelmann
Copy link
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit 30f82aa has been approved by jdonszelmann

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…rt, r=jdonszelmann

Convert to inline diagnostics in `rustc_query_system`

For rust-lang#151366 (comment)

r? @jdonszelmann (or anyone else who feels like it)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…rt, r=jdonszelmann

Convert to inline diagnostics in `rustc_query_system`

For rust-lang#151366 (comment)

r? @jdonszelmann (or anyone else who feels like it)
rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #152034 (Show largest job duration changes in hours and minutes in the post-merge report)
 - #152039 (coverage: Add a test case for a previously-unknown span mismatch)
 - #152045 (Convert to inline diagnostics in `rustc_infer`)
 - #149263 (Forbid manual `Unpin` impls for structurally pinned types)
 - #151754 (Check proj's parent is trait or not when checking dyn compatibility)
 - #151848 (Port `rustc_mir` to attribute parser)
 - #151874 (error on unsized AnonConsts)
 - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`)
 - #152012 (Use `DEVELOPER_DIR` instead of a custom `xcode-select` script)
 - #152019 (`NativeLib` cleanups)
 - #152029 (disable socket tests in Miri)
 - #152041 (Convert to inline diagnostics in `rustc_query_system`)
 - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness)

Failed merges:

 - #152046 (Use glob imports for attribute parsers)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
…rt, r=jdonszelmann

Convert to inline diagnostics in `rustc_query_system`

For rust-lang#151366 (comment)

r? @jdonszelmann (or anyone else who feels like it)
rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #152034 (Show largest job duration changes in hours and minutes in the post-merge report)
 - #152039 (coverage: Add a test case for a previously-unknown span mismatch)
 - #152045 (Convert to inline diagnostics in `rustc_infer`)
 - #149263 (Forbid manual `Unpin` impls for structurally pinned types)
 - #151754 (Check proj's parent is trait or not when checking dyn compatibility)
 - #151848 (Port `rustc_mir` to attribute parser)
 - #151874 (error on unsized AnonConsts)
 - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`)
 - #152019 (`NativeLib` cleanups)
 - #152029 (disable socket tests in Miri)
 - #152041 (Convert to inline diagnostics in `rustc_query_system`)
 - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness)

Failed merges:

 - #152046 (Use glob imports for attribute parsers)
rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #152034 (Show largest job duration changes in hours and minutes in the post-merge report)
 - #152039 (coverage: Add a test case for a previously-unknown span mismatch)
 - #152045 (Convert to inline diagnostics in `rustc_infer`)
 - #149263 (Forbid manual `Unpin` impls for structurally pinned types)
 - #151754 (Check proj's parent is trait or not when checking dyn compatibility)
 - #151848 (Port `rustc_mir` to attribute parser)
 - #151874 (error on unsized AnonConsts)
 - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`)
 - #152019 (`NativeLib` cleanups)
 - #152029 (disable socket tests in Miri)
 - #152041 (Convert to inline diagnostics in `rustc_query_system`)
 - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness)

Failed merges:

 - #152046 (Use glob imports for attribute parsers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants