Implement PROBLEMATIC_CONSTS generalization #115253
Implement PROBLEMATIC_CONSTS generalization #115253bors merged 25 commits intorust-lang:masterfrom donno2048:patch-1
PROBLEMATIC_CONSTS generalization #115253Conversation
|
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.
dtolnay
left a comment
There was a problem hiding this comment.
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_CONSTSPROBLEMATIC_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 |
albertlarsan68
left a comment
There was a problem hiding this comment.
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≈3and some more constants.The new
PROBLEMATIC_CONSTSwas generated using this code: