about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Casper <sebastiancasper3@gmail.com>2022-11-01 17:27:43 -0700
committerSteven Casper <sebastiancasper3@gmail.com>2022-11-01 17:53:41 -0700
commitb7d9af278cc7e2d3bc8845156a0ab405a3536724 (patch)
tree783625e300c13b62b48190d2d09716206442f62b
parent139f2a3cda66da80659cfa6e5f1a6a4536ce96a2 (diff)
downloadrust-b7d9af278cc7e2d3bc8845156a0ab405a3536724.tar.gz
rust-b7d9af278cc7e2d3bc8845156a0ab405a3536724.zip
Fix examples
-rw-r--r--clippy_lints/src/let_underscore.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/clippy_lints/src/let_underscore.rs b/clippy_lints/src/let_underscore.rs
index 05be1743d54..8da7b8c3543 100644
--- a/clippy_lints/src/let_underscore.rs
+++ b/clippy_lints/src/let_underscore.rs
@@ -69,13 +69,20 @@ declare_clippy_lint! {
     ///
     /// ### Example
     /// ```rust
-    /// async fn foo() -> Result<(), ()> { }
+    /// async fn foo() -> Result<(), ()> {
+    ///     Ok(())
+    /// }
     /// let _ = foo();
     /// ```
     ///
     /// Use instead:
     /// ```rust
+    /// # async fn context() {
+    /// async fn foo() -> Result<(), ()> {
+    ///     Ok(())
+    /// }
     /// let _ = foo().await;
+    /// # }
     /// ```
     #[clippy::version = "1.66"]
     pub LET_UNDERSCORE_FUTURE,