Choose another error code
This commit is contained in:
parent
1413253a41
commit
22ebcaca16
3 changed files with 3 additions and 3 deletions
|
|
@ -2026,5 +2026,5 @@ register_diagnostics! {
|
|||
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 @@ impl<'a> LoweringContext<'a> {
|
|||
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…
Add table
Add a link
Reference in a new issue