We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 061a643 commit a0638e5Copy full SHA for a0638e5
crates/ide/src/inlay_hints/closure_ret.rs
@@ -63,7 +63,10 @@ pub(super) fn hints(
63
} else {
64
Some(config.lazy_text_edit(|| {
65
let body = closure.body();
66
- let body_range = body.expect("Closure must have a body").syntax().text_range();
+ let body_range = match body {
67
+ Some(body) => body.syntax().text_range(),
68
+ None => return TextEdit::builder().finish(),
69
+ };
70
let mut builder = TextEdit::builder();
71
let insert_pos = param_list.syntax().text_range().end();
72
0 commit comments