Skip to content

Commit 3ac1759

Browse files
committed
internal: add test case for inlay hint support for block expr with lifetime label
1 parent 1a1deeb commit 3ac1759

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

crates/ide/src/inlay_hints/closing_brace.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,29 @@ fn f() {
195195
];
196196
}
197197
//^ fn f
198+
"#,
199+
);
200+
}
201+
202+
#[test]
203+
fn hints_closing_brace_for_block_expr() {
204+
check_with_config(
205+
InlayHintsConfig { closing_brace_hints_min_lines: Some(2), ..DISABLED_CONFIG },
206+
r#"
207+
fn test() {
208+
'end: {
209+
'do_a: {
210+
'do_b: {
211+
212+
}
213+
//^ 'do_b
214+
break 'end;
215+
}
216+
//^ 'do_a
217+
}
218+
//^ 'end
219+
}
220+
//^ fn test
198221
"#,
199222
);
200223
}

0 commit comments

Comments
 (0)