1 error[E0644]: closure/generator type that references itself
2 --> $DIR/generator-yielding-or-returning-itself.rs:15:34
4 LL | want_cyclic_generator_return(|| {
5 | __________________________________^
7 LL | | if false { yield None.unwrap(); }
10 | |_____^ cyclic type of infinite size
12 = note: closures cannot capture themselves or take themselves as argument;
13 this error may be the result of a recent compiler bug-fix,
14 see https://github.com/rust-lang/rust/issues/46062 for more details
16 error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]`
17 --> $DIR/generator-yielding-or-returning-itself.rs:28:5
19 LL | pub fn want_cyclic_generator_yield<T>(_: T)
20 | ---------------------------
21 LL | where T: Generator<Yield = T, Return = ()>
22 | --------- required by this bound in `want_cyclic_generator_yield`
24 LL | want_cyclic_generator_yield(|| {
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size
27 = note: closures cannot capture themselves or take themselves as argument;
28 this error may be the result of a recent compiler bug-fix,
29 see https://github.com/rust-lang/rust/issues/46062 for more details
31 error: aborting due to 2 previous errors
33 Some errors have detailed explanations: E0271, E0644.
34 For more information about an error, try `rustc --explain E0271`.