Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/highlight_related.rs')
-rw-r--r--crates/ide/src/highlight_related.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs
index 540a115832..28f65a11cf 100644
--- a/crates/ide/src/highlight_related.rs
+++ b/crates/ide/src/highlight_related.rs
@@ -766,6 +766,23 @@ fn foo() ->$0 u32 {
}
#[test]
+ fn test_hl_inner_tail_exit_points_loops() {
+ check(
+ r#"
+fn foo() ->$0 u32 {
+ 'foo: while { return 0; true } {
+ // ^^^^^^
+ break 'foo 0;
+ // ^^^^^
+ return 0;
+ // ^^^^^^
+ }
+}
+"#,
+ );
+ }
+
+ #[test]
fn test_hl_break_loop() {
check(
r#"