Choose another error code
This commit is contained in:
parent
1413253a41
commit
22ebcaca16
@ -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
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user