-
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
#5626: lint iterator.map(|x| x) #5694
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthiaskrgr (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
☔ The latest upstream changes (presumably #5378) made this pull request unmergeable. Please resolve the merge conflicts. |
I'm wondering if |
☔ The latest upstream changes (presumably #5279) made this pull request unmergeable. Please resolve the merge conflicts. |
Could you please rebase and remove the merge commits? |
56d15ab
to
a763836
Compare
Done. There's still a merge at the end to get rid of the merge conflict though. Also just asking because I don't know git that well, is there a reason why those merge commits aren't wanted? |
AFAIK we follow rustcs no-merge policy https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests edit: Alternatively I could squash-merge the entire pr as a single commit. |
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.
@wangtheo If you have difficulties with rebasing, we can do this for you. In fact, I pushed a branch on my fork, where I squashed this PR in one commit: https://github.com/flip1995/rust-clippy/tree/issue-5626
e386261
to
4bf66ac
Compare
Oh that's interesting, I'll keep that in mind.
I tried rebasing again and I think I managed to get rid of the merge commits 😃 Also it looks like the branch isn't building and I'm not too sure why. |
I think a squash commit would be reasonable here. (There's still one unrelated commit.) How to squash: git rebase -i upstream/master # assuming upstream is the remote of the rust-lang/rust-clippy repo
# editor will open
# change pick -> reword in the first line
# change pick -> fixup in every other line
# save and close editor
# a new editor instance will open, where you can adjust the commit message
Don't worry about that, this will be fixed in another PR (you may have to rebase after that though) |
Followed your instructions and squashed the commit, thanks for the help 😃 |
@bors r+ |
📌 Commit 40ee620 has been approved by |
🌲 The tree is currently closed for pull requests below priority 10, this pull request will be tested once the tree is reopened |
@bors treeclosed- |
#5626: lint iterator.map(|x| x) changelog: adds a new lint for iterator.map(|x| x) (see #5626) The code also lints for result.map(|x| x) and option.map(|x| x). Also, I'm not sure if I'm checking for type adjustments correctly and I can't think of an example where .map(|x| x) would apply type adjustments.
💔 Test failed - checks-action_test |
|
Thanks! |
📌 Commit fb4f9a0 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
…licy, r=Manishearth Add note that we follow a rustc no merge-commit policy I think it would be better to add a note that we follow a rustc no merge-commit policy. For example, it was mentioned at #5694 (comment). changelog: none
changelog: adds a new lint for iterator.map(|x| x) (see #5626)
The code also lints for result.map(|x| x) and option.map(|x| x). Also, I'm not sure if I'm checking for type adjustments correctly and I can't think of an example where .map(|x| x) would apply type adjustments.