Tweak bad `continue` error
This commit is contained in:
parent
3893d16341
commit
5ef47160e8
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue