about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-19 23:57:37 +0000
committerbors <bors@rust-lang.org>2022-05-19 23:57:37 +0000
commit44be090f2eb185e94f64b38a51b51db30b1f9704 (patch)
tree8e9da6b358300097ec11a004c5152dbd675940c7
parentbf37fe23f3e5912a047bd0a0ff18b68006384e75 (diff)
parent641b78a162ffad6138f12e3e8c6165d81bb4e2e8 (diff)
downloadrust-44be090f2eb185e94f64b38a51b51db30b1f9704.tar.gz
rust-44be090f2eb185e94f64b38a51b51db30b1f9704.zip
Auto merge of #12320 - NotWearingPants:patch-1, r=Veykril
Hide closure ret hints if ret type is specified

Fixes #12319
-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,