error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:25:34: 29:6 _] as std::ops::Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:25:34: 29:6 _]` --> $DIR/generator-yielding-or-returning-itself.rs:25:5 | LL | want_cyclic_generator_return(|| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, see https://github.com/rust-lang/rust/issues/46062 for more details note: required by `want_cyclic_generator_return` --> $DIR/generator-yielding-or-returning-itself.rs:19:1 | LL | / pub fn want_cyclic_generator_return(_: T) LL | | where T: Generator LL | | { LL | | } | |_^ error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:38:33: 42:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:38:33: 42:6 _]` --> $DIR/generator-yielding-or-returning-itself.rs:38:5 | LL | want_cyclic_generator_yield(|| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, see https://github.com/rust-lang/rust/issues/46062 for more details note: required by `want_cyclic_generator_yield` --> $DIR/generator-yielding-or-returning-itself.rs:32:1 | LL | / pub fn want_cyclic_generator_yield(_: T) LL | | where T: Generator LL | | { LL | | } | |_^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0271`.