-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Generic async function not_send
#6947
Comments
So then shouldn't you add the constraint |
This is stopping this lint being used in https://github.com/serenity-rs/serenity because a lot of methods take |
That means users with a runtime that doesn't require Send (i.e. single threaded runtime) can no longer use the function, for no good reason. I believe this lint should only lint async functions whose future is unconditionally I'd also be fine with a new lint |
Lint name:
future_not_send
I tried this code:
I expected to see this happen: nothing - I think this code is correct, the returned future is not
Send
only ifR
isn't.Instead, this happened: warning - Clippy complains that the future isn't
Send
becausereader
is used acrossawait
(bydrop
) andreader
does not implementSend
Meta
cargo clippy -V
: 0.0.212 (cb75ad5d 2021-02-10)rustc -Vv
:The text was updated successfully, but these errors were encountered: