Skip to content

Commit a82caff

Browse files
bors[bot]Veykril
andauthored
Merge #11765
11765: fix: Fix closure hints using macro ranges r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2 parents 7315d97 + 2598575 commit a82caff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ide/src/inlay_hints.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,12 @@ fn closure_ret_hints(
344344
return None;
345345
}
346346

347-
let closure = sema.descend_node_into_attributes(closure.clone()).pop()?;
348-
349347
let param_list = match closure.body() {
350348
Some(ast::Expr::BlockExpr(_)) => closure.param_list()?,
351349
_ => return None,
352350
};
351+
352+
let closure = sema.descend_node_into_attributes(closure.clone()).pop()?;
353353
let ty = sema.type_of_expr(&ast::Expr::ClosureExpr(closure))?.adjusted();
354354
let callable = ty.as_callable(sema.db)?;
355355
let ty = callable.return_type();

0 commit comments

Comments
 (0)