about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-18 18:36:50 +0000
committerbors <bors@rust-lang.org>2022-04-18 18:36:50 +0000
commitcbdf17c884116f17b1efe8c6dd3c41eb45d1342c (patch)
treed781047a1e50c4c61a21b7ed1365e202cd0e5f5a /compiler/rustc_codegen_llvm/src
parent95de4dcb5ebc556cf4fc16b874ba18835bff898b (diff)
parent05086858c4058400053e67d53d647ffa43945530 (diff)
downloadrust-cbdf17c884116f17b1efe8c6dd3c41eb45d1342c.tar.gz
rust-cbdf17c884116f17b1efe8c6dd3c41eb45d1342c.zip
Auto merge of #8707 - OneSignal:await-invalid-types, r=llogiq
Add `await_holding_invalid_type` lint

changelog: [`await_holding_invalid_type`]

This lint allows users to create a denylist of types which are not allowed to be
held across await points. This is essentially a re-implementation of the
language-level [`must_not_suspend`
lint](https://github.com/rust-lang/rust/issues/83310). That lint has a lot of
work still to be done before it will reach Rust stable, and in the meantime
there are a lot of types which can trip up developers if they are used
improperly.

I originally implemented this specifically for `tracing::span::Entered`, until I discovered #8434 and read the commentary on that PR. Given this implementation is fully user configurable, doesn't tie clippy to any one particular crate, and introduces no additional dependencies, it seems more appropriate.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions