Skip to content

Convert to inline diagnostics in rustc_parse#152235

Open
JonathanBrouwer wants to merge 4 commits intorust-lang:mainfrom
JonathanBrouwer:convert_parse
Open

Convert to inline diagnostics in rustc_parse#152235
JonathanBrouwer wants to merge 4 commits intorust-lang:mainfrom
JonathanBrouwer:convert_parse

Conversation

@JonathanBrouwer
Copy link
Contributor

This was the most annoying one by far, had to make a few changes to the representation of two errors (no user-facing changes tho), these changes are in separate commits for clarity :)

For #151366
r? @jdonszelmann

@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2026

rustc_macros::diagnostics was changed

cc @davidtwco, @TaKO8Ki

@rustbot rustbot added 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 6, 2026
Copy link
Contributor

@jdonszelmann jdonszelmann left a comment

Choose a reason for hiding this comment

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

r=me after you looked at that :)

View changes since this review

@jdonszelmann
Copy link
Contributor

If this is such a common operation, why don't we have PSess::empty(). That might be nicer actually

@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Feb 6, 2026

I thought about it, but in a few days after the other crates are translated I can just remove the argument from PSess::new entirely, so not worth the effort

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Feb 6, 2026
//@ needs-subprocess

// FIXME(151366) Currently `-Ztranslate-additional-ftl` is currently broken
//@ ignore-test
Copy link
Contributor Author

@JonathanBrouwer JonathanBrouwer Feb 6, 2026

Choose a reason for hiding this comment

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

@jdonszelmann I accidentally broke the unstable -Ztranslate-additional-ftl option. This option can be used to override translation messages. This is already broken on nightly, it's just that the only test using this option happened to use rustc_parse.

I should be able to repair this with a little bit of effort, might take me a few days and this PR is very brittle, so would prefer to do this in a separate PR. I added this to the tracking issue so it is not forgotten. You can r+ if you agree with this approach

@rust-bors

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 7, 2026

☔ The latest upstream changes (presumably #152264) made this pull request unmergeable. Please resolve the merge conflicts.

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants