Skip to content

Remove redundant check for #[loop_match] and #[const_continue]#158138

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
obeis:move-check-loop-match
Jun 19, 2026
Merged

Remove redundant check for #[loop_match] and #[const_continue]#158138
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
obeis:move-check-loop-match

Conversation

@obeis

@obeis obeis commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Updates #153101

remove check_loop_match and check_const_continue from check_attr.rs as they only verifies that the target, which is already enforced by check_target in target_checking.rs via ALLOWED_TARGETS.

r? @JonathanBrouwer

@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

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

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

JonathanBrouwer is currently at their maximum review capacity.
They may take a while to respond.

@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.

r=me with nit and green ci

View changes since this review

Comment thread compiler/rustc_passes/src/check_attr.rs
@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@obeis obeis changed the title Remove redundant check for #[loop_match] Remove redundant check for #[loop_match] and #[const_continue] Jun 19, 2026

@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.

r=me with nit and green ci

View changes since this review

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

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@obeis obeis requested a review from JonathanBrouwer June 19, 2026 16:27
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 19, 2026
@rust-log-analyzer

This comment has been minimized.

remove `check_loop_match` from `check_attr.rs` as it only verifies
that the target is a loop, which is already enforced by `check_target`
in `target_checking.rs` via `ALLOWED_TARGETS`, and its `LoopMatchAttr`
diagnostic.
@obeis obeis force-pushed the move-check-loop-match branch from 4ff8f9a to 569a2ff Compare June 19, 2026 17:06
remove `check_const_continue` from `check_attr.rs` as it only verifies
that the target is a break, which is already enforced by `check_target`
in `target_checking.rs` via `ALLOWED_TARGETS`, and it's's
`ConstContinueAttr` diagnostic.
@obeis obeis force-pushed the move-check-loop-match branch from 569a2ff to 620bf09 Compare June 19, 2026 17:20

@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.

@bors r+ rollup
Thanks a lot!

View changes since this review

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 620bf09 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. 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 19, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 19, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #158129 (ensure the new solver bootstraps on CI)
 - #158134 (Rename `lint-rust-version` to `hint-msrv`)
 - #157926 (Implement `#[diagnostic::on_unknown]` for modules.)
 - #158075 (Point to the unstable segment of an import path instead of to the whole path)
 - #158084 (`-Znext-solver` Emit error instead of ICE when combining {int, float} var with alias)
 - #158128 (std: use correct low surrogate range in Windows standard I/O code)
 - #158132 (std: correctly report file size on UWP)
 - #158138 (Remove redundant check for `#[loop_match]` and `#[const_continue]`)
@rust-bors rust-bors Bot merged commit 2c5fdb9 into rust-lang:main Jun 19, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 19, 2026
rust-timer added a commit that referenced this pull request Jun 19, 2026
Rollup merge of #158138 - obeis:move-check-loop-match, r=JonathanBrouwer

Remove redundant check for `#[loop_match]` and `#[const_continue]`

Updates #153101

remove `check_loop_match` and `check_const_continue` from `check_attr.rs` as they only verifies that the target, which is already enforced by `check_target` in `target_checking.rs` via `ALLOWED_TARGETS`.

r? @JonathanBrouwer
@obeis obeis deleted the move-check-loop-match branch June 19, 2026 21:46
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@rust-timer build cf6f8a0

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (cf6f8a0): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.7% [1.1%, 4.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [1.1%, 4.3%] 2

Cycles

Results (secondary -5.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.4% [-5.4%, -5.4%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 481.965s -> 482.858s (0.19%)
Artifact size: 390.67 MiB -> 391.21 MiB (0.14%)

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.

5 participants