From 6f0447b52bdbe1bc54902816078f3dbef4426515 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Wed, 22 Feb 2017 18:10:37 -0800 Subject: [PATCH] Change break or continue with no label to error nmbr 590 --- src/librustc_passes/diagnostics.rs | 2 +- src/librustc_passes/loops.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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))