blob: 9699abd5661a2510b5bfd547a78992fa46454142 [file] [log] [blame]
error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _] as std::ops::Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _]`
--> $DIR/generator-yielding-or-returning-itself.rs:15:5
|
LL | pub fn want_cyclic_generator_return<T>(_: T)
| ---------------------------- required by a bound in this
LL | where T: Generator<Yield = (), Return = T>
| ---------- required by this bound in `want_cyclic_generator_return`
...
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 issue #46062 <https://github.com/rust-lang/rust/issues/46062>
for more information
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 _]`
--> $DIR/generator-yielding-or-returning-itself.rs:28:5
|
LL | pub fn want_cyclic_generator_yield<T>(_: T)
| --------------------------- required by a bound in this
LL | where T: Generator<Yield = T, Return = ()>
| --------- required by this bound in `want_cyclic_generator_yield`
...
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 issue #46062 <https://github.com/rust-lang/rust/issues/46062>
for more information
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0271`.