From 641b78a162ffad6138f12e3e8c6165d81bb4e2e8 Mon Sep 17 00:00:00 2001 From: NotWearingPants <26556598+NotWearingPants@users.noreply.github.com> Date: Fri, 20 May 2022 02:35:37 +0300 Subject: [PATCH] hide closure ret hints if ret type is specified fixes #12319 --- crates/ide/src/inlay_hints.rs | 4 ++++ 1 file changed, 4 insertions(+) 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,