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
restrict manual_clamp to const case, bring it out of nursery #12543
Conversation
4484597
to
0cf9d9c
Compare
Hey @GuillaumeGomez, do you want to take a look at this PR? |
Sure! |
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.
Apart from my nit, lint group and code changes both look good to me.
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.
Looks good to me now, thanks!
Handing back review to @xFrednet now. ;)
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.
Two small NITs and then this should be good to go. Thank you for coming back and fixing the lint!
Also thank you to @GuillaumeGomez for the review :)
Looks good to me, thank you! :D @bors r=xFrednet,GuillaumeGomez |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
1 similar comment
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request. |
Implements the plan that I described in #9484 (comment)
This does two things primarily
manual_clamp
such that it will only trigger if we are able to guarantee thatclamp
won't panic at runtime.manual_clamp
out of nursery status and move it into the complexity group.changelog: [
manual_clamp
]: Restrict this lint such that it only triggers if max and min are const, and max is greater than or equal to min. Then bring it out of the nursery group.