Skip to content

Commit 44be090

Browse files
committed
Auto merge of rust-lang#12320 - NotWearingPants:patch-1, r=Veykril
Hide closure ret hints if ret type is specified Fixes rust-lang#12319
2 parents bf37fe2 + 641b78a commit 44be090

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)