1 More than one parameter was used for a generator.
3 Erroneous code example:
6 #![feature(generators, generator_trait)]
9 let generator = |a: i32, b: i32| {
10 // error: too many parameters for a generator
11 // Allowed only 0 or 1 parameter
17 At present, it is not permitted to pass more than one explicit
18 parameter for a generator.This can be fixed by using
19 at most 1 parameter for the generator. For example, we might resolve
20 the previous example by passing only one parameter.
23 #![feature(generators, generator_trait)]
26 let generator = |a: i32| {