Skip to content
Permalink
Browse files

Tweak bad `continue` error

  • Loading branch information
estebank committed Nov 25, 2019
1 parent 3893d16 commit 5ef47160e84c82b86ee96f41cf40477855c2c5c0
Showing with 4 additions and 9 deletions.
  1. +2 −2 src/librustc_passes/loops.rs
  2. +2 −7 src/test/ui/label/label_break_value_continue.stderr
@@ -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

0 comments on commit 5ef4716

Please sign in to comment.
You can’t perform that action at this time.