Skip to content

Commit 641b78a

Browse files
hide closure ret hints if ret type is specified
fixes #12319
1 parent bf37fe2 commit 641b78a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/ide/src/inlay_hints.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ fn closure_ret_hints(
463463
return None;
464464
}
465465

466+
if closure.ret_type().is_some() {
467+
return None;
468+
}
469+
466470
let param_list = match closure.body() {
467471
Some(ast::Expr::BlockExpr(_)) => closure.param_list()?,
468472
_ => return None,

0 commit comments

Comments
 (0)