Skip to content

Convert to inline diagnostics in rustc_parse#152235

Merged
rust-bors[bot] merged 9 commits intorust-lang:mainfrom
JonathanBrouwer:convert_parse
Feb 7, 2026
Merged

Convert to inline diagnostics in rustc_parse#152235
rust-bors[bot] merged 9 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

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds reasonable, don't think we do any real translation atm anyway

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Feb 7, 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.

@jdonszelmann
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 7, 2026

📌 Commit 75ef135 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 7, 2026
@rust-bors rust-bors bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 7, 2026

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in tests/ui/sanitizer

cc @rcvalle

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 7, 2026

⚠️ A new commit 00dd7dbe57923937377ed81369ec3206bf61b161 was pushed to the branch, the PR will need to be re-approved.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 7, 2026
@JonathanBrouwer
Copy link
Contributor Author

Rebased on #152252 (which is in the current rollup) because they will conflict

@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Feb 7, 2026

@bors r+
I think this should be fine, since it will just automatically rebase?

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 7, 2026

📌 Commit 00dd7db has been approved by JonathanBrouwer

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 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 7, 2026
…onathanBrouwer

Convert to inline diagnostics in `rustc_parse`

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 rust-lang#151366
r? @jdonszelmann
rust-bors bot pushed a commit that referenced this pull request Feb 7, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #148590 (Stabilize `atomic_try_update`and deprecate `fetch_update` starting 1.99.0)
 - #150522 (Stabilize new inclusive range type and iterator type)
 - #152235 (Convert to inline diagnostics in `rustc_parse`)
 - #152267 (feat: Implement `int_from_ascii` for `NonZero<T>`)
 - #151576 (Stabilize `core::hint::cold_path`)
 - #151933 (Linker-plugin-based LTO: give an explanation how to use linker-plugin-lto with full LTO)
 - #152010 (Ignore all debuginfo tests for LLDB that we do not run in CI)
 - #152199 (Move `rustc_query_system::cache`.)
@rust-bors rust-bors bot merged commit 828b9c2 into rust-lang:main Feb 7, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 7, 2026
rust-timer added a commit that referenced this pull request Feb 7, 2026
Rollup merge of #152235 - JonathanBrouwer:convert_parse, r=JonathanBrouwer

Convert to inline diagnostics in `rustc_parse`

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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