]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-56164.stderr
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / consts / issue-56164.stderr
1 error[E0015]: cannot call non-const closure in constant functions
2   --> $DIR/issue-56164.rs:3:18
3    |
4 LL | const fn foo() { (||{})() }
5    |                  ^^^^^^^^
6    |
7    = note: closures need an RFC before allowed to be called in constant functions
8    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
9
10 error: function pointers are not allowed in const fn
11   --> $DIR/issue-56164.rs:7:5
12    |
13 LL |     input()
14    |     ^^^^^^^
15
16 error: aborting due to 2 previous errors
17
18 For more information about this error, try `rustc --explain E0015`.