Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/undeclared_label.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/undeclared_label.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide-diagnostics/src/handlers/undeclared_label.rs b/crates/ide-diagnostics/src/handlers/undeclared_label.rs
index a6a0fdc655..97943b7e8b 100644
--- a/crates/ide-diagnostics/src/handlers/undeclared_label.rs
+++ b/crates/ide-diagnostics/src/handlers/undeclared_label.rs
@@ -38,10 +38,12 @@ fn foo() {
fn while_let_loop_with_label_in_condition() {
check_diagnostics(
r#"
+//- minicore: option
+
fn foo() {
let mut optional = Some(0);
- 'my_label: while let Some(a) = match optional {
+ 'my_label: while let Some(_) = match optional {
None => break 'my_label,
Some(val) => Some(val),
} {
@@ -59,8 +61,8 @@ fn foo() {
r#"
//- minicore: iterator
fn foo() {
- 'xxx: for _ in unknown {
- 'yyy: for _ in unknown {
+ 'xxx: for _ in [] {
+ 'yyy: for _ in [] {
break 'xxx;
continue 'yyy;
break 'zzz;