Skip to content

Convert to inline diagnostics in rustc_attr_parsing#151944

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
JonathanBrouwer:diag4
Feb 3, 2026
Merged

Convert to inline diagnostics in rustc_attr_parsing#151944
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
JonathanBrouwer:diag4

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Feb 1, 2026

Converts a crate for #151366
This PR is almost completely autogenerated by a hacky script I have locally :)

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 1, 2026
@rust-log-analyzer

This comment has been minimized.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 2, 2026
Add inline syntax for diagnostic messages

This PR adds the new inline diagnostics syntax needed for rust-lang#151366.
The syntax itself is briefly described in the MCP: rust-lang/compiler-team#959

To test these changes:
* I added quite a few uitests
* I converted the first crate `rustc_attr_parsing` to the new syntax in a separate PR: rust-lang#151944

r? @Kivooeo
rust-timer added a commit that referenced this pull request Feb 3, 2026
Rollup merge of #151872 - JonathanBrouwer:diag3, r=Kivooeo

Add inline syntax for diagnostic messages

This PR adds the new inline diagnostics syntax needed for #151366.
The syntax itself is briefly described in the MCP: rust-lang/compiler-team#959

To test these changes:
* I added quite a few uitests
* I converted the first crate `rustc_attr_parsing` to the new syntax in a separate PR: #151944

r? @Kivooeo
@rust-bors

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer marked this pull request as ready for review February 3, 2026 09:20
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

rustc_errors::translation was changed

cc @davidtwco, @TaKO8Ki

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Feb 3, 2026

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

@rustbot rustbot assigned jdonszelmann and unassigned jackh726 Feb 3, 2026
@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit f8fe49e 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
Convert to inline diagnostics in `rustc_attr_parsing`

Converts a crate for rust-lang#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 3, 2026
Convert to inline diagnostics in `rustc_attr_parsing`

Converts a crate for rust-lang#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
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)
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)
@rust-bors rust-bors bot merged commit fabcf5a into rust-lang:main Feb 3, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Feb 3, 2026
Rollup merge of #151944 - JonathanBrouwer:diag4, r=jdonszelmann

Convert to inline diagnostics in `rustc_attr_parsing`

Converts a crate for #151366
This PR is almost completely autogenerated by a hacky script I have locally :)
@JonathanBrouwer
Copy link
Contributor Author

@rust-timer build a2af88d

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a2af88d): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.2%, 0.5%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.1%] 14
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Cycles

Results (secondary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.991s -> 474.095s (0.45%)
Artifact size: 397.70 MiB -> 397.74 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Feb 4, 2026
@JonathanBrouwer
Copy link
Contributor Author

Fascinating, I wasn't expecting this to have a perf impact.
The perf is more positive than negative so I don't think it matters, but I'll look into this regardless

@nnethercote
Copy link
Contributor

The perf is more positive than negative so I don't think it matters, but I'll look into this regardless

I wouldn't spend much time on this, if any. The changes are small and few, and evenly balanced between positive and negative.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic perf-regression Performance regression. 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.

7 participants