Skip to content

Commit 7bff592

Browse files
committed
internal: add test case for inlay hint support for block expr with lifetime label
1 parent aee0e30 commit 7bff592

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs

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

0 commit comments

Comments
 (0)