]>
Commit | Line | Data |
---|---|---|
29967ef6 | 1 | error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6] as Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6]` |
74b04a01 | 2 | --> $DIR/generator-yielding-or-returning-itself.rs:15:5 |
b7449926 | 3 | | |
74b04a01 XL |
4 | LL | want_cyclic_generator_return(|| { |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size | |
b7449926 XL |
6 | | |
7 | = note: closures cannot capture themselves or take themselves as argument; | |
8 | this error may be the result of a recent compiler bug-fix, | |
74b04a01 XL |
9 | see issue #46062 <https://github.com/rust-lang/rust/issues/46062> |
10 | for more information | |
94222f64 XL |
11 | note: required by a bound in `want_cyclic_generator_return` |
12 | --> $DIR/generator-yielding-or-returning-itself.rs:10:36 | |
13 | | | |
14 | LL | pub fn want_cyclic_generator_return<T>(_: T) | |
15 | | ---------------------------- required by a bound in this | |
16 | LL | where T: Generator<Yield = (), Return = T> | |
17 | | ^^^^^^^^^^ required by this bound in `want_cyclic_generator_return` | |
b7449926 | 18 | |
29967ef6 | 19 | error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6] as Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6]` |
0731742a | 20 | --> $DIR/generator-yielding-or-returning-itself.rs:28:5 |
b7449926 XL |
21 | | |
22 | LL | want_cyclic_generator_yield(|| { | |
23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size | |
24 | | | |
25 | = note: closures cannot capture themselves or take themselves as argument; | |
26 | this error may be the result of a recent compiler bug-fix, | |
74b04a01 XL |
27 | see issue #46062 <https://github.com/rust-lang/rust/issues/46062> |
28 | for more information | |
94222f64 XL |
29 | note: required by a bound in `want_cyclic_generator_yield` |
30 | --> $DIR/generator-yielding-or-returning-itself.rs:23:24 | |
31 | | | |
32 | LL | pub fn want_cyclic_generator_yield<T>(_: T) | |
33 | | --------------------------- required by a bound in this | |
34 | LL | where T: Generator<Yield = T, Return = ()> | |
35 | | ^^^^^^^^^ required by this bound in `want_cyclic_generator_yield` | |
b7449926 XL |
36 | |
37 | error: aborting due to 2 previous errors | |
38 | ||
74b04a01 | 39 | For more information about this error, try `rustc --explain E0271`. |