]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-56164.stderr
suggest fix for attempted integer identifier in patterns
[rust.git] / tests / ui / consts / issue-56164.stderr
1 error[E0015]: cannot call non-const closure in constant functions
2   --> $DIR/issue-56164.rs:1: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 pointer calls are not allowed in constant functions
11   --> $DIR/issue-56164.rs:5:5
12    |
13 LL |     input()
14    |     ^^^^^^^
15
16 note: erroneous constant used
17   --> $DIR/issue-56164.rs:1:18
18    |
19 LL | const fn foo() { (||{})() }
20    |                  ^^^^^^
21
22 note: erroneous constant used
23   --> $DIR/issue-56164.rs:1:18
24    |
25 LL | const fn foo() { (||{})() }
26    |                  ^^^^^^
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0015`.