]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/await_holding_invalid.rs
Auto merge of #8937 - Jarcho:merge_match_passes, r=llogiq
[rust.git] / clippy_lints / src / await_holding_invalid.rs
index 5659651c8426ae12f9cacad724a351790f936cf1..5b7c4591504e1cbaa3710a1cad5b684b4f13efbe 100644 (file)
     ///
     /// ```toml
     /// await-holding-invalid-types = [
+    ///   # You can specify a type name
     ///   "CustomLockType",
+    ///   # You can (optionally) specify a reason
+    ///   { path = "OtherCustomLockType", reason = "Relies on a thread local" }
     /// ]
     /// ```
     ///
     /// ```rust
     /// # async fn baz() {}
     /// struct CustomLockType;
+    /// struct OtherCustomLockType;
     /// async fn foo() {
     ///   let _x = CustomLockType;
+    ///   let _y = OtherCustomLockType;
     ///   baz().await; // Lint violation
     /// }
     /// ```