Skip to content

Fix unused_braces lint suggestion when encountering attributes #141550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented May 25, 2025

This PR fixes the unused_braces lint suggestion when encountering attributes by not removing them in the suggestion.

Fixes #141549

@rustbot
Copy link
Collaborator

rustbot commented May 25, 2025

r? @oli-obk

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

@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 May 25, 2025
@rust-log-analyzer

This comment has been minimized.

@Urgau Urgau force-pushed the unused_braces-attrs branch from 6c6a6fc to 4765fd6 Compare May 25, 2025 16:17
@chenyukang
Copy link
Member

@bors r=chenyukang

@bors
Copy link
Collaborator

bors commented May 26, 2025

📌 Commit 4765fd6 has been approved by chenyukang

It is now in the queue for this repository.

@bors bors 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 May 26, 2025
bors added a commit that referenced this pull request May 26, 2025
Rollup of 10 pull requests

Successful merges:

 - #140898 (minor improvements on running miri)
 - #141392 (Avoid obligation construction dance with query region constraints)
 - #141431 (Emit dummy open drop for unsafe binder)
 - #141433 (Properly analyze captures from unsafe binders)
 - #141439 (Deduplicate dyn compatibility violations due to coercion)
 - #141449 (further deduplicate ast visitor code)
 - #141513 (interpret: add allocation parameters to `AllocBytes`)
 - #141516 (speed up charsearcher for ascii chars)
 - #141526 (add a dedicated section for compiler environment variables in the unstable book)
 - #141550 (Fix `unused_braces` lint suggestion when encountering attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bca4279 into rust-lang:master May 26, 2025
6 checks passed
rust-timer added a commit that referenced this pull request May 26, 2025
Rollup merge of #141550 - Urgau:unused_braces-attrs, r=chenyukang

Fix `unused_braces` lint suggestion when encountering attributes

This PR fixes the `unused_braces` lint suggestion when encountering attributes by not removing them in the suggestion.

Fixes #141549
@rustbot rustbot added this to the 1.89.0 milestone May 26, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request May 27, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#140898 (minor improvements on running miri)
 - rust-lang/rust#141392 (Avoid obligation construction dance with query region constraints)
 - rust-lang/rust#141431 (Emit dummy open drop for unsafe binder)
 - rust-lang/rust#141433 (Properly analyze captures from unsafe binders)
 - rust-lang/rust#141439 (Deduplicate dyn compatibility violations due to coercion)
 - rust-lang/rust#141449 (further deduplicate ast visitor code)
 - rust-lang/rust#141513 (interpret: add allocation parameters to `AllocBytes`)
 - rust-lang/rust#141516 (speed up charsearcher for ascii chars)
 - rust-lang/rust#141526 (add a dedicated section for compiler environment variables in the unstable book)
 - rust-lang/rust#141550 (Fix `unused_braces` lint suggestion when encountering attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

unused_braces suggestion also removes attributes
6 participants