-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add lint manual_str_repeat
#7265
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
2d894e8
to
d6c3273
Compare
I tested this lint against a lot of crates and it worked perfectly. Some of the type checks could be tightened up through because it can get confused by custom implementations of
|
I forgot you could do that with |
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.
Can you add this lint to the lint documentation in clippy_lints/src/utils/conf.rs
, and tests for MSRV?
What change do you want with the documentation? |
☔ The latest upstream changes (presumably #7292) made this pull request unmergeable. Please resolve the merge conflicts. |
Here: rust-clippy/clippy_lints/src/utils/conf.rs Line 127 in 6eea598
|
dfdc009
to
855b93b
Compare
@bors r+ It looks good, thanks! |
📌 Commit cfddf09 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes: #7260
There's a similar function for slices. Should this be renamed to include it, or should that be a separate lint? If we are going to have them as one lint a better name will be needed.
manual_repeat
isn't exactly clear as it's replacing a call toiter::repeat
.changelog: Add new lint
manual_str_repeat