Skip to content

Conversation

@samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Sep 14, 2025

Since an asm!() statement is mostly unknown, as we do not know what it does, consider all labels' break as being conditionally executed only.

Fixes #15673

changelog: [never_loop]: do not consider break labels used in asm!() as being unconditionally executed as they might not be

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2025

r? @y21

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

This comment has been minimized.

@samueltardieu
Copy link
Member Author

r? clippy

@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2025

This PR was rebased onto a different master 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.

@samueltardieu
Copy link
Member Author

r? clippy

//~v never_loop
loop {
// We don't check the applicability in tests, but this should
// be `Applicability::MaybeIncorrect` because of the `break`
Copy link
Member

Choose a reason for hiding this comment

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

Is this working currently or a FIXME?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't figure out why I wrote this, so I removed it. Moreover, no suggestion is proposed here, so applicability doesn't matter.

Since an `asm!()` statement is mostly unknown, as we do not know what it
does, consider all labels' `break` as being conditionally executed only.
@Alexendoo Alexendoo added this pull request to the merge queue Oct 27, 2025
Merged via the queue into rust-lang:master with commit 0226fa9 Oct 27, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

never_loop false positive with inline assembly label blocks

5 participants