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

Add the manual_async_fn lint #5576

Merged
merged 3 commits into from
May 8, 2020
Merged

Add the manual_async_fn lint #5576

merged 3 commits into from
May 8, 2020

Conversation

ebroto
Copy link
Member

@ebroto ebroto commented May 7, 2020

changelog: Added the manual_async_fn lint to warn on functions that can be simplified using async syntax

Closes #5503

@flip1995
Copy link
Member

flip1995 commented May 7, 2020

Does this PR fix an issue?

@ebroto
Copy link
Member Author

ebroto commented May 7, 2020

Yes, my bad! Just edited the original comment

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Love the message+suggestion generation!

clippy_lints/src/manual_async_fn.rs Outdated Show resolved Hide resolved
clippy_lints/src/manual_async_fn.rs Outdated Show resolved Hide resolved
clippy_lints/src/manual_async_fn.rs Show resolved Hide resolved
tests/ui/manual_async_fn.rs Show resolved Hide resolved
@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label May 7, 2020
@flip1995
Copy link
Member

flip1995 commented May 8, 2020

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented May 8, 2020

📌 Commit 3e4bc02 has been approved by flip1995

@bors
Copy link
Contributor

bors commented May 8, 2020

⌛ Testing commit 3e4bc02 with merge 78b7d49...

@bors
Copy link
Contributor

bors commented May 8, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 78b7d49 to master...

@bors bors merged commit 78b7d49 into rust-lang:master May 8, 2020
@bors bors mentioned this pull request May 8, 2020
@ebroto ebroto deleted the manual_async_fn branch May 8, 2020 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fn that returns a future and contains a single async block should be linted to use async fn instead
3 participants