implemented lint unnecessary_min#11951
implemented lint unnecessary_min#11951FelixMaetzler wants to merge 56 commits intorust-lang:masterfrom FelixMaetzler:merge-conflicts
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (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 (
|
|
Hi, this is my first PR ever so please give me feedback if i did something wrong. |
Co-authored-by: Marti Raudsepp <marti@juffo.org>
Co-authored-by: Marti Raudsepp <marti@juffo.org>
| let cv = constant(cx, cx.typeck_results(), expr)?; | ||
|
|
||
| match (ty.kind(), cv) { |
There was a problem hiding this comment.
There was a problem hiding this comment.
Oh i didnt know this method existed.
I will look into that.
Thank you!
There was a problem hiding this comment.
I'm not sure how to implement that change.
I need to use the ty.kind() because i have to know how many bits the integer has.
If i use your proposal, than i only know if it is signed or unsigned and i can't use the math in the arms because it gives me a i128 if it is signed. (unsext wants u128)
Do i miss or misunderstand something here?
Thank you for your feedback. I appreciate it.
|
☔ The latest upstream changes (presumably #11977) made this pull request unmergeable. Please resolve the merge conflicts. |
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits: |
|
i tried the |
|
@rustbot ready |
|
☔ The latest upstream changes (presumably #12004) made this pull request unmergeable. Please resolve the merge conflicts. |
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits (since this message was last posted): |
Adds a pair of lints that check for cases of an iterator over `Result` and `Option` followed by `filter` without being followed by `map` as that is covered already by a different, specialized lint. changelog: New Lint: [`iter_filter_is_some`] changelog: New Lint: [`iter_filter_is_ok`]
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits (since this message was last posted): |
|
can somebody please help me? |
|
You can try You can |
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits (since this message was last posted): |
|
i tried it but i didnt figure it out. |
fixes #11924
Please write a short comment explaining your change (or "none" for internal only changes)