We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
await_holding_invalid_type
1 parent ee3ebb3 commit a511072Copy full SHA for a511072
clippy_lints/src/await_holding_invalid.rs
@@ -144,20 +144,17 @@ declare_clippy_lint! {
144
///
145
/// ### Example
146
147
- /// Strings are, of course, safe to hold across await points. This example
148
- /// exists only to show how this lint might be configured for third-party
149
- /// crates.
150
- ///
151
/// ```toml
152
/// await-holding-invalid-types = [
153
- /// "std::string::String",
+ /// "CustomLockType",
154
/// ]
155
/// ```
156
157
/// ```rust
158
/// # async fn baz() {}
+ /// struct CustomLockType;
159
/// async fn foo() {
160
- /// let _x = String::from("hello!");
+ /// let _x = CustomLockType;
161
/// baz().await; // Lint violation
162
/// }
163
0 commit comments