about summary refs log tree commit diff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorNotWearingPants <26556598+NotWearingPants@users.noreply.github.com>2022-05-20 02:35:37 +0300
committerGitHub <noreply@github.com>2022-05-20 02:35:37 +0300
commit641b78a162ffad6138f12e3e8c6165d81bb4e2e8 (patch)
tree8e9da6b358300097ec11a004c5152dbd675940c7 /crates/ide/src
parentbf37fe23f3e5912a047bd0a0ff18b68006384e75 (diff)
downloadrust-641b78a162ffad6138f12e3e8c6165d81bb4e2e8.tar.gz
rust-641b78a162ffad6138f12e3e8c6165d81bb4e2e8.zip
hide closure ret hints if ret type is specified
fixes #12319
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/inlay_hints.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index 47f1a08b6fb..5eb63a42ad5 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -463,6 +463,10 @@ fn closure_ret_hints(
         return None;
     }
 
+    if closure.ret_type().is_some() {
+        return None;
+    }
+
     let param_list = match closure.body() {
         Some(ast::Expr::BlockExpr(_)) => closure.param_list()?,
         _ => return None,