-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make multiple_unsafe_ops_per_block
ignore await desugaring
#11646
Make multiple_unsafe_ops_per_block
ignore await desugaring
#11646
Conversation
r? @giraffate (rustbot has picked a reviewer for you, use r? to override) |
We should really ignore any expansion, right? It's not like multiple operations always causes soundness problems or anything, and the author can't change it. Macros in the current crate I'm not sure, but I'd err on the safe side. |
It would be interesting if that was done for all warnings, but I don't see why it should be special cased for this one? |
This is already done for most lints, so no, it shouldn't be special cased for this one :) There are reasons to lint macro-generated code though, for example when it's UB or almost certainly incorrect |
The await desugaring contains two calls (`Poll::new_unchecked` and `get_context`) inside a single unsafe block. That violates the lint.
3dff1c3
to
6ed04af
Compare
@bors r+ Thanks! |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
thanks for fixing this here @Nilstrieb 🙇 |
The await desugaring contains two calls (
Poll::new_unchecked
andget_context
) inside a single unsafe block. That violates the lint.fixes #11312
changelog: [
multiple_unsafe_ops_per_block
]: fix false positives in.await