Add test for E0628 (too many generator parameters)

This commit is contained in:
Jonas Schievink 2020-01-24 23:00:45 +01:00
parent fca614eb57
commit 4ee857c4c3
2 changed files with 15 additions and 0 deletions

View File

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

View File

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