Choose another error code

This commit is contained in:
Alex Crichton 2017-08-14 19:38:32 -07:00
parent 1413253a41
commit 22ebcaca16
3 changed files with 3 additions and 3 deletions

View File

@ -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
}

View File

@ -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();
}

View File

@ -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