Update error message with too many parameters

This commit is contained in:
Jonas Schievink 2020-02-04 13:35:38 +01:00
parent 341eaf5f55
commit cc66d29e43
3 changed files with 4 additions and 3 deletions

View File

@ -693,7 +693,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.sess,
fn_decl_span,
E0628,
"too many parameters for generator (expected 0 or 1 parameters)"
"too many parameters for a generator (expected 0 or 1 parameters)"
)
.emit();
}

View File

@ -1,7 +1,8 @@
#![feature(generators)]
fn main() {
|(), ()| { //~ error: too many parameters for generator
|(), ()| {
//~^ error: too many parameters for a generator
yield;
};
}

View File

@ -1,4 +1,4 @@
error[E0628]: too many parameters for generator (expected 0 or 1 parameters)
error[E0628]: too many parameters for a generator (expected 0 or 1 parameters)
--> $DIR/too-many-parameters.rs:4:5
|
LL | |(), ()| {