-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement PROBLEMATIC_CONSTS
generalization
#115253
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
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.
Thanks!
Would it be possible to keep just the short list of root problematic consts, and then put your generate_problems
logic into tidy, instead of expanding it all out like this?
That would be much more easily auditable.
@dtolnay I thought because the list is static it'd be better to make it hardcoded, wouldn't it? |
I don't know a reason that it would need to be static. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
But also correct me if I'm wrong, but without using the |
PROBLEMATIC_CONSTS
PROBLEMATIC_CONSTS
generalization
Yes, good point. The regex approach ( I don't know the importance of looking for the decimal converted values. I have assigned back to @joshtriplett who created this lint originally. |
I think if we are ignoring some cases of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rustbot review |
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 the PR!
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (43a0686): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.432s -> 673.234s (0.27%) |
You forgot that
A≈4
,B≈8
, andE≈3
and some more constants.The new
PROBLEMATIC_CONSTS
was generated using this code: