From 22ebcaca168dd929f8d99a66fb9d348f615c6cc1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 14 Aug 2017 19:38:32 -0700 Subject: [PATCH] Choose another error code --- src/librustc/diagnostics.rs | 2 +- src/librustc/hir/lowering.rs | 2 +- src/test/ui/generator/no-arguments-on-generators.stderr | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 23616b4bc38..480e6ee1bc5 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -2026,5 +2026,5 @@ fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { E0495, // cannot infer an appropriate lifetime due to conflicting requirements E0566, // conflicting representation hints E0623, // lifetime mismatch where both parameters are anonymous regions - E0625, // generators cannot have explicit arguments + E0628, // generators cannot have explicit arguments } diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index f7ffda03f23..fed06128cc9 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1980,7 +1980,7 @@ fn lower_expr(&mut self, e: &Expr) -> hir::Expr { e }); if is_generator && !decl.inputs.is_empty() { - span_err!(this.sess, fn_decl_span, E0625, + span_err!(this.sess, fn_decl_span, E0628, "generators cannot have explicit arguments"); this.sess.abort_if_errors(); } diff --git a/src/test/ui/generator/no-arguments-on-generators.stderr b/src/test/ui/generator/no-arguments-on-generators.stderr index 290ad7b7f6c..4d2e228685a 100644 --- a/src/test/ui/generator/no-arguments-on-generators.stderr +++ b/src/test/ui/generator/no-arguments-on-generators.stderr @@ -1,4 +1,4 @@ -error[E0625]: generators cannot have explicit arguments +error[E0628]: generators cannot have explicit arguments --> $DIR/no-arguments-on-generators.rs:14:15 | 14 | let gen = |start| { //~ ERROR generators cannot have explicit arguments