Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2598575

Browse files
committed
fix: Fix closure hints using macro ranges
1 parent 7da5b80 commit 2598575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ide/src/inlay_hints.rs

Lines changed: 2 additions & 2 deletions
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)