Change break or continue with no label to error nmbr 590
This commit is contained in:
parent
a611bbcceb
commit
6f0447b52b
2 changed files with 2 additions and 2 deletions
|
|
@ -242,7 +242,7 @@ match 5u32 {
|
|||
```
|
||||
"##,
|
||||
|
||||
E0583: r##"
|
||||
E0590: r##"
|
||||
`break` or `continue` must include a label when used in the condition of a
|
||||
`while` loop.
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ impl<'a, 'hir> CheckLoopVisitor<'a, 'hir> {
|
|||
}
|
||||
|
||||
fn emit_unlabled_cf_in_while_condition(&mut self, span: Span, cf_type: &str) {
|
||||
struct_span_err!(self.sess, span, E0583,
|
||||
struct_span_err!(self.sess, span, E0590,
|
||||
"`break` or `continue` with no label in the condition of a `while` loop")
|
||||
.span_label(span,
|
||||
&format!("unlabeled `{}` in the condition of a `while` loop", cf_type))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue