-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
never_loop
: don't emit AlwaysBreaks if it targets a block
#9858
Conversation
Introduced an ignored_ids parameter. Takes O(n^2) time in the worst case. Can be changed to collect block ids in first phase, and then filter with binary search in second.
r? @Jarcho (rust-highfive has picked a reviewer for you, use r? to override) |
r? @dswij For continuity on the same issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for this!
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
ref: #9837 (comment)
The previous fix (#9837) was too simple and ignored all break commands inside a labelled block, regardless of whether their destination was a labelled block or a loop. This fix tracks all the labelled blocks in scope to ensure that only breaks targeting loops are considered.
changelog: [
never_loop
]: prevent false negatives frombreaks
nested in labelled blocks