fixup! Add await_holding_invalid_type
lint
This commit is contained in:
parent
ee3ebb35f4
commit
a511072c2c
@ -144,20 +144,17 @@
|
|||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// Strings are, of course, safe to hold across await points. This example
|
|
||||||
/// exists only to show how this lint might be configured for third-party
|
|
||||||
/// crates.
|
|
||||||
///
|
|
||||||
/// ```toml
|
/// ```toml
|
||||||
/// await-holding-invalid-types = [
|
/// await-holding-invalid-types = [
|
||||||
/// "std::string::String",
|
/// "CustomLockType",
|
||||||
/// ]
|
/// ]
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # async fn baz() {}
|
/// # async fn baz() {}
|
||||||
|
/// struct CustomLockType;
|
||||||
/// async fn foo() {
|
/// async fn foo() {
|
||||||
/// let _x = String::from("hello!");
|
/// let _x = CustomLockType;
|
||||||
/// baz().await; // Lint violation
|
/// baz().await; // Lint violation
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
Reference in New Issue
Block a user