Skip to content
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 manual-strip lint #6038

Merged
merged 5 commits into from Sep 16, 2020
Merged

Add manual-strip lint #6038

merged 5 commits into from Sep 16, 2020

Conversation

ghost
Copy link

@ghost ghost commented Sep 14, 2020

Add manual-strip lint.

changelog: Add manual-strip lint

Michael Wright added 2 commits September 14, 2020 06:11
Add a new lint, `manual-strip`, that suggests using the `str::strip_prefix`
and `str::strip_suffix` methods introduced in Rust 1.45 when the same
functionality is performed 'manually'.

Closes #5734
@rust-highfive
Copy link

r? @matthiaskrgr

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 14, 2020
@bors
Copy link
Contributor

bors commented Sep 15, 2020

☔ The latest upstream changes (presumably #6013) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

tests/ui/manual_strip.rs Show resolved Hide resolved
clippy_lints/src/manual_strip.rs Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Sep 16, 2020

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@flip1995
Copy link
Member

Testing rustbot

@rustbot modify labels: +S-waiting-on-author -S-waiting-on-review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Sep 16, 2020
@flip1995
Copy link
Member

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Sep 16, 2020
@matthiaskrgr
Copy link
Member

thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 16, 2020

📌 Commit 79a0e51 has been approved by matthiaskrgr

@bors
Copy link
Contributor

bors commented Sep 16, 2020

⌛ Testing commit 79a0e51 with merge 5e60497...

@bors
Copy link
Contributor

bors commented Sep 16, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing 5e60497 to master...

@bors bors merged commit 5e60497 into rust-lang:master Sep 16, 2020
@ghost ghost deleted the lint-5734 branch September 17, 2020 03:53
@jhpratt
Copy link
Member

jhpratt commented Nov 21, 2020

This is quite broad, as it doesn't just test for the simple case. The lint is triggering in a block of code that I have where not only do I need the access the stripped part, but there's also side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants