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

[map_identity]: allow closure with type annotations #11521

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

y21
Copy link
Member

@y21 y21 commented Sep 17, 2023

Fixes #9122

.map(|a: u32| a) can help type inference, so we should probably allow this and not warn about "unnecessary map of the identity function"

changelog: [map_identity]: allow closure with type annotations

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2023

r? @llogiq

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 17, 2023
clippy_utils/src/lib.rs Outdated Show resolved Hide resolved
@llogiq
Copy link
Contributor

llogiq commented Oct 20, 2023

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 20, 2023

📌 Commit bba155e has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Oct 20, 2023

⌛ Testing commit bba155e with merge e230f19...

@bors
Copy link
Collaborator

bors commented Oct 20, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing e230f19 to master...

@bors bors merged commit e230f19 into rust-lang:master Oct 20, 2023
5 checks passed
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.

False positive in map_identity
4 participants