Skip to content

Convert to inline diagnostics in rustc_incremental#152044

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JonathanBrouwer:rustc_incremental_convert
Feb 4, 2026
Merged

Convert to inline diagnostics in rustc_incremental#152044
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
JonathanBrouwer:rustc_incremental_convert

Conversation

@JonathanBrouwer
Copy link
Contributor

For #151366

@rustbot rustbot added 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
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

r? @chenyukang

rustbot has assigned @chenyukang.
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

#[derive(Diagnostic)]
#[diag(incremental_corrupt_file)]
#[diag(
"corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant."
Copy link
Member

Choose a reason for hiding this comment

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

doesn't tidy reject such long lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem like it does (it passes locally), probably because it is one big literal.
I can see if I can find a way to split it up, perhaps allowing multiple literal.

In the .ftl file this was also a single line tho, so this PR doesn't make the situation worse.
Would prefer to fix this in a separate PR since then I can do it for all rustc crates at the same time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this to the "unresolved questions" of the tracking issue to ensure it's not forgotten

@oli-obk
Copy link
Contributor

oli-obk commented Feb 3, 2026

I originally was wondering/hoping if we could use doc comments instead of an attribute. But that may be too magical

@JonathanBrouwer
Copy link
Contributor Author

I originally was wondering/hoping if we could use doc comments instead of an attribute. But that may be too magical

Implementing this is not hard, tho slightly more annoying than the current implementation.
I prefer the current syntax more because:

  • As you mentioned, it feels less magical
  • We need attributes anyways for #[note], #[primary_span], etc, so making only the message a doc attribute feels inconsistent
  • This gets highlighted nicer by IDEs

@lqd
Copy link
Member

lqd commented Feb 3, 2026

👌

r? me @bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit 3d006f7 has been approved by lqd

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 3, 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-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 3, 2026
@rust-bors

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer force-pushed the rustc_incremental_convert branch from 3d006f7 to 4cacfc0 Compare February 3, 2026 22:23
@rustbot
Copy link
Collaborator

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

@JonathanBrouwer
Copy link
Contributor Author

@bors r=lqd

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit 4cacfc0 has been approved by lqd

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
…convert, r=lqd

Convert to inline diagnostics in `rustc_incremental`

For rust-lang#151366
rust-bors bot pushed a commit that referenced this pull request Feb 4, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #148967 (const-eval: always do mem-to-mem copies if there might be padding involved)
 - #152012 (Use `DEVELOPER_DIR` instead of a custom `xcode-select` script)
 - #152044 (Convert to inline diagnostics in `rustc_incremental`)
 - #152046 (Use glob imports for attribute parsers)
 - #152054 (Distinguish error message for `#[diagnostic::on_const]` on const trait impls)
 - #152059 (Fix some autodiff tests require Clto=fat)
 - #152073 (Convert to inline diagnostics in `rustc_mir_dataflow`)
@rust-bors rust-bors bot merged commit df2daa3 into rust-lang:main Feb 4, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 4, 2026
rust-timer added a commit that referenced this pull request Feb 4, 2026
Rollup merge of #152044 - JonathanBrouwer:rustc_incremental_convert, r=lqd

Convert to inline diagnostics in `rustc_incremental`

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

Labels

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.

5 participants