]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/generator-yielding-or-returning-itself.stderr
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / generator / generator-yielding-or-returning-itself.stderr
1 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 _]`
2   --> $DIR/generator-yielding-or-returning-itself.rs:15:5
3    |
4 LL | pub fn want_cyclic_generator_return<T>(_: T)
5    |        ----------------------------
6 LL |     where T: Generator<Yield = (), Return = T>
7    |                                    ---------- required by this bound in `want_cyclic_generator_return`
8 ...
9 LL |     want_cyclic_generator_return(|| {
10    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size
11    |
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 issue #46062 <https://github.com/rust-lang/rust/issues/46062>
15            for more information
16
17 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 _]`
18   --> $DIR/generator-yielding-or-returning-itself.rs:28:5
19    |
20 LL | pub fn want_cyclic_generator_yield<T>(_: T)
21    |        ---------------------------
22 LL |     where T: Generator<Yield = T, Return = ()>
23    |                        --------- required by this bound in `want_cyclic_generator_yield`
24 ...
25 LL |     want_cyclic_generator_yield(|| {
26    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size
27    |
28    = note: closures cannot capture themselves or take themselves as argument;
29            this error may be the result of a recent compiler bug-fix,
30            see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
31            for more information
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0271`.