]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / unboxed-closures / unboxed-closure-no-cyclic-sig.stderr
1 error[E0644]: closure/generator type that references itself
2   --> $DIR/unboxed-closure-no-cyclic-sig.rs:8:7
3    |
4 LL |     g(|_| {  });
5    |       ^^^ cyclic type of infinite size
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,
9            see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
10            for more information
11 note: required by a bound in `g`
12   --> $DIR/unboxed-closure-no-cyclic-sig.rs:5:24
13    |
14 LL | fn g<F>(_: F) where F: FnOnce(Option<F>) {}
15    |                        ^^^^^^^^^^^^^^^^^ required by this bound in `g`
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0644`.