Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs b/crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs
index 7baa7b6426..30576c71fb 100644
--- a/crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs
+++ b/crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs
@@ -124,12 +124,14 @@ fn foo() {
#[test]
fn value_break_in_for_loop() {
+ // FIXME: the error is correct, but the message is terrible
check_diagnostics(
r#"
+//- minicore: iterator
fn test() {
for _ in [()] {
break 3;
- // ^^^^^^^ error: can't break with a value in this position
+ // ^ error: expected (), found i32
}
}
"#,