1 error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36] as Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36]`
2 --> $DIR/generator-yielding-or-returning-itself.rs:15:34
4 LL | want_cyclic_generator_return(|| {
5 | _____----------------------------_^
7 | | required by a bound introduced by this call
9 LL | | if false { yield None.unwrap(); }
12 | |_____^ cyclic type of infinite size
14 = note: closures cannot capture themselves or take themselves as argument;
15 this error may be the result of a recent compiler bug-fix,
16 see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
18 note: required by a bound in `want_cyclic_generator_return`
19 --> $DIR/generator-yielding-or-returning-itself.rs:10:36
21 LL | pub fn want_cyclic_generator_return<T>(_: T)
22 | ---------------------------- required by a bound in this
23 LL | where T: Generator<Yield = (), Return = T>
24 | ^^^^^^^^^^ required by this bound in `want_cyclic_generator_return`
26 error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35] as Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35]`
27 --> $DIR/generator-yielding-or-returning-itself.rs:28:33
29 LL | want_cyclic_generator_yield(|| {
30 | _____---------------------------_^
32 | | required by a bound introduced by this call
34 LL | | if false { yield None.unwrap(); }
37 | |_____^ cyclic type of infinite size
39 = note: closures cannot capture themselves or take themselves as argument;
40 this error may be the result of a recent compiler bug-fix,
41 see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
43 note: required by a bound in `want_cyclic_generator_yield`
44 --> $DIR/generator-yielding-or-returning-itself.rs:23:24
46 LL | pub fn want_cyclic_generator_yield<T>(_: T)
47 | --------------------------- required by a bound in this
48 LL | where T: Generator<Yield = T, Return = ()>
49 | ^^^^^^^^^ required by this bound in `want_cyclic_generator_yield`
51 error: aborting due to 2 previous errors
53 For more information about this error, try `rustc --explain E0271`.