Skip to content

Commit a511072

Browse files
fixup! Add await_holding_invalid_type lint
1 parent ee3ebb3 commit a511072

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clippy_lints/src/await_holding_invalid.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,17 @@ declare_clippy_lint! {
144144
///
145145
/// ### Example
146146
///
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-
///
151147
/// ```toml
152148
/// await-holding-invalid-types = [
153-
/// "std::string::String",
149+
/// "CustomLockType",
154150
/// ]
155151
/// ```
156152
///
157153
/// ```rust
158154
/// # async fn baz() {}
155+
/// struct CustomLockType;
159156
/// async fn foo() {
160-
/// let _x = String::from("hello!");
157+
/// let _x = CustomLockType;
161158
/// baz().await; // Lint violation
162159
/// }
163160
/// ```

0 commit comments

Comments
 (0)