Skip to content

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Jan 4, 2021

This fixes a false positive in needless_return lint, when triggered in a closure using return statement without value.

Fixes: #6501

changelog: none

@rust-highfive
Copy link

r? @ebroto

(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 Jan 4, 2021
@ThibsG ThibsG force-pushed the FixClosureNeedlessReturn branch from 322f703 to 3975f66 Compare January 4, 2021 21:03
@bors
Copy link
Contributor

bors commented Jan 15, 2021

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

@ThibsG ThibsG force-pushed the FixClosureNeedlessReturn branch from 3975f66 to 46aa654 Compare January 15, 2021 17:59
@ebroto
Copy link
Contributor

ebroto commented Jan 16, 2021

r? @phansch (I'm leaving the team, so I'm reassigning my PRs to other active members)

@rust-highfive rust-highfive assigned phansch and unassigned ebroto Jan 16, 2021
@phansch
Copy link
Contributor

phansch commented Jan 17, 2021

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Jan 17, 2021

📌 Commit 46aa654 has been approved by phansch

@bors
Copy link
Contributor

bors commented Jan 17, 2021

⌛ Testing commit 46aa654 with merge 40ce9f8...

@bors
Copy link
Contributor

bors commented Jan 17, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing 40ce9f8 to master...

@bors bors merged commit 40ce9f8 into rust-lang:master Jan 17, 2021
@ThibsG ThibsG deleted the FixClosureNeedlessReturn branch January 17, 2021 16:40
bors added a commit that referenced this pull request Jan 19, 2021
Add test for `needless_return` lint

Just a follow up of #6549 that adds a test for this lint.

changelog: none
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.

Needless Return at the end of function inside a closure suggests invalid code
5 participants