Auto merge of #11646 - Nilstrieb:compiler-does-not-comply-with-the-lints!!, r=giraffate

Make `multiple_unsafe_ops_per_block` ignore await desugaring

The await desugaring contains two calls (`Poll::new_unchecked` and `get_context`) inside a single unsafe block. That violates the lint.

fixes #11312

changelog: [`multiple_unsafe_ops_per_block`]: fix false positives in `.await`
This commit is contained in:
bors 2023-10-17 00:35:50 +00:00
commit 2cf708d04f
2 changed files with 12 additions and 2 deletions

View file

@ -147,4 +147,11 @@ fn _field_fn_ptr(x: unsafe fn()) {
}
}
// await expands to an unsafe block with several operations, but this is fine.: #11312
async fn await_desugaring_silent() {
async fn helper() {}
helper().await;
}
fn main() {}