Skip to content

Rename errors.rs file to diagnostics.rs (2/N)#157535

Open
GuillaumeGomez wants to merge 3 commits into
rust-lang:mainfrom
GuillaumeGomez:rename-err-to-diag-2
Open

Rename errors.rs file to diagnostics.rs (2/N)#157535
GuillaumeGomez wants to merge 3 commits into
rust-lang:mainfrom
GuillaumeGomez:rename-err-to-diag-2

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

@GuillaumeGomez GuillaumeGomez commented Jun 6, 2026

Follow-up of #157485.

r? @JonathanBrouwer

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 6, 2026

Some changes occurred in rustc_ty_utils::consts.rs

cc @BoxyUwU

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to diagnostic attributes.

cc @mejrs

Some changes occurred in check-cfg diagnostics

cc @Urgau

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Jun 6, 2026
@JonathanBrouwer JonathanBrouwer changed the title Rename errors.rs file to diagnostics.rs Rename errors.rs file to diagnostics.rs (2/N) Jun 6, 2026
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer Jun 6, 2026

Choose a reason for hiding this comment

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

rustc_attr_parsing has both errors.rs and session_diagnostics.rs. I think it makes sense to merge those together into a single diagnostics.rs?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rustc_attr_parsing/attributes/diagnostic/mod.rs also has some diagnostic structs in it, if we're merging files we might as well move those too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Time to merge some files then!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To clarify; I meant "move the diagnostic structs in rustc_attr_parsing/attributes/diagnostic/mod.rs to diagnostics.rs". Not the attribute parsers.

@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 Jun 6, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Moved all diagnostics into diagnostics.rs as suggested.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rename-err-to-diag-2 branch from 139c97a to feac3e0 Compare June 6, 2026 22:33
@rustbot rustbot added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Jun 6, 2026
@@ -1,56 +0,0 @@
use rustc_feature::AttributeStability;
Copy link
Copy Markdown
Contributor

@mejrs mejrs Jun 6, 2026

Choose a reason for hiding this comment

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

Please undo these deletions. same for all the other files in this directory.

View changes since the review

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants