diff --git a/src/librustc_passes/diagnostics.rs b/src/librustc_passes/diagnostics.rs index c576b35cb17b..5f06eadb84a9 100644 --- a/src/librustc_passes/diagnostics.rs +++ b/src/librustc_passes/diagnostics.rs @@ -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. diff --git a/src/librustc_passes/loops.rs b/src/librustc_passes/loops.rs index 003142f34983..b2d51be5bf72 100644 --- a/src/librustc_passes/loops.rs +++ b/src/librustc_passes/loops.rs @@ -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))