Tweak bad `continue` error

This commit is contained in:
Esteban Küber 2019-11-25 12:35:30 -08:00
parent 3893d16341
commit 5ef47160e8
2 changed files with 4 additions and 9 deletions

View File

@ -144,8 +144,8 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
"`continue` pointing to a labeled block")
.span_label(e.span,
"labeled blocks cannot be `continue`'d")
.span_note(block.span,
"labeled block the continue points to")
.span_label(block.span,
"labeled block the `continue` points to")
.emit();
}
}

View File

@ -7,16 +7,11 @@ LL | continue;
error[E0696]: `continue` pointing to a labeled block
--> $DIR/label_break_value_continue.rs:14:9
|
LL | continue 'b;
| ^^^^^^^^^^^ labeled blocks cannot be `continue`'d
|
note: labeled block the continue points to
--> $DIR/label_break_value_continue.rs:13:5
|
LL | / 'b: {
LL | | continue 'b;
| | ^^^^^^^^^^^ labeled blocks cannot be `continue`'d
LL | | }
| |_____^
| |_____- labeled block the `continue` points to
error[E0695]: unlabeled `continue` inside of a labeled block
--> $DIR/label_break_value_continue.rs:22:13