Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/unreachable_label.rs')
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/unreachable_label.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide-diagnostics/src/handlers/unreachable_label.rs b/crates/ide-diagnostics/src/handlers/unreachable_label.rs index f09659fa9e..5933a9b694 100644 --- a/crates/ide-diagnostics/src/handlers/unreachable_label.rs +++ b/crates/ide-diagnostics/src/handlers/unreachable_label.rs @@ -25,8 +25,10 @@ fn foo() { 'a: loop { async { break 'a; + //^^^^^^^^ error: break outside of loop // ^^ error: use of unreachable label `'a` continue 'a; + //^^^^^^^^^^^ error: continue outside of loop // ^^ error: use of unreachable label `'a` }; } @@ -43,8 +45,10 @@ fn foo() { 'a: loop { || { break 'a; + //^^^^^^^^ error: break outside of loop // ^^ error: use of unreachable label `'a` continue 'a; + //^^^^^^^^^^^ error: continue outside of loop // ^^ error: use of unreachable label `'a` }; } |