Skip to content

Suggest comma multiple#157592

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
ariagivens:suggest-comma-multiple
Jun 8, 2026
Merged

Suggest comma multiple#157592
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
ariagivens:suggest-comma-multiple

Conversation

@ariagivens

@ariagivens ariagivens commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Following from #157545

If there are multiple missing comma's, suggest fixing all of them in one step to avoid error cascade.

For example:

error: attribute items not separated with `,`
   |
LL |     name = "name"
   |                  ^ help: try adding `,` here

followed by

error: attribute items not separated with `,`
   |
LL |     kind = "static"
   |                    ^ help: try adding `,` here

after adding the comma.

Now this becomes one error:

error: attribute items not separated with `,`
  --> $DIR/attr-missing-comma.rs:10:18
   |
LL |     name = "name"
   |                  ^
   |
help: try adding `,` here
   |
LL |     name = "name",
   |                  +
help: try adding `,` here
   |
LL |     kind = "static",
   |                    +

@rustbot

rustbot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@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 8, 2026
@rustbot

rustbot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

r? @tiif

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 20 candidates

@JonathanBrouwer JonathanBrouwer left a comment

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.

@rust-bors

rust-bors Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c865af6 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 Jun 8, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 8, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157599 (`rust-analyzer` subtree update)
 - #157298 (Use alternate means of detecting enums in `is_udt`)
 - #155338 (Staticlib hide internal symbols)
 - #157402 (Implement feature `integer_casts`)
 - #157452 (Fix WASI links)
 - #157535 (Rename `errors.rs` file to `diagnostics.rs` (2/N))
 - #157585 (Rename `errors.rs` file to `diagnostics.rs` (3/N))
 - #157588 (Use `mul nuw nsw` in `intrinsics::copy`)
 - #157592 (Suggest comma multiple)
@rust-bors rust-bors Bot merged commit 0b6b505 into rust-lang:main Jun 8, 2026
12 checks passed
rust-timer added a commit that referenced this pull request Jun 8, 2026
Rollup merge of #157592 - ariagivens:suggest-comma-multiple, r=JonathanBrouwer

Suggest comma multiple

Following from #157545

If there are multiple missing comma's, suggest fixing all of them in one step to avoid error cascade.

For example:
```
error: attribute items not separated with `,`
   |
LL |     name = "name"
   |                  ^ help: try adding `,` here
```
followed by
```
error: attribute items not separated with `,`
   |
LL |     kind = "static"
   |                    ^ help: try adding `,` here
```
after adding the comma.

Now this becomes one error:
```
error: attribute items not separated with `,`
  --> $DIR/attr-missing-comma.rs:10:18
   |
LL |     name = "name"
   |                  ^
   |
help: try adding `,` here
   |
LL |     name = "name",
   |                  +
help: try adding `,` here
   |
LL |     kind = "static",
   |                    +
```
@rustbot rustbot added this to the 1.98.0 milestone Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

4 participants