1 error[E0015]: cannot call non-const closure in constant functions
2 --> $DIR/issue-56164.rs:1:18
4 LL | const fn foo() { (||{})() }
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
10 error: function pointer calls are not allowed in constant functions
11 --> $DIR/issue-56164.rs:5:5
16 note: erroneous constant used
17 --> $DIR/issue-56164.rs:1:18
19 LL | const fn foo() { (||{})() }
22 note: erroneous constant used
23 --> $DIR/issue-56164.rs:1:18
25 LL | const fn foo() { (||{})() }
28 error: aborting due to 2 previous errors
30 For more information about this error, try `rustc --explain E0015`.