Skip to content

Conversation

@tesuji
Copy link
Contributor

@tesuji tesuji commented Jul 16, 2024

Fix #13073 .

Please enable "ignore white-space change" settings in github UI for easy reviewing.

HACK: The third commit contains a hack to check if a type T: 'static when fn() -> U where U: 'static.
I don't have a clean way to check for it.

changelog: [redundant_closure] Fix false positive with closures has return type contains 'static

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 16, 2024
@tesuji tesuji marked this pull request as draft July 16, 2024 09:00
@tesuji tesuji force-pushed the fix_redundant_closure branch from 6062dbb to 84182ff Compare July 16, 2024 13:27
@tesuji tesuji marked this pull request as ready for review July 16, 2024 13:32
@tesuji tesuji force-pushed the fix_redundant_closure branch 3 times, most recently from 6fc6518 to 33d00b3 Compare July 18, 2024 12:56
@bors
Copy link
Contributor

bors commented Jul 25, 2024

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

@tesuji tesuji force-pushed the fix_redundant_closure branch from 33d00b3 to 0bc9f00 Compare July 25, 2024 17:30
@y21
Copy link
Member

y21 commented Jul 30, 2024

Sorry for the long wait here, I don't have enough time to properly look into/review this atm, so I'm going to reroll to not block this any longer: r? clippy

@rustbot rustbot assigned xFrednet and unassigned y21 Jul 30, 2024
@xFrednet
Copy link
Contributor

xFrednet commented Aug 1, 2024

Looks good to me, thank you for the fix and slight refactoring :D


Roses are red,
Violets are blue,
T: 'static,
And generics are erased

@bors
Copy link
Contributor

bors commented Aug 1, 2024

📌 Commit 0bc9f00 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 1, 2024

⌛ Testing commit 0bc9f00 with merge 2fc74a3...

@bors
Copy link
Contributor

bors commented Aug 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 2fc74a3 to master...

@bors bors merged commit 2fc74a3 into rust-lang:master Aug 1, 2024
@tesuji tesuji deleted the fix_redundant_closure branch August 1, 2024 13:32
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.

redundant_closure false positive with as_deref

5 participants