]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-68542-closure-in-array-len.stderr
ty: convert `ErrorHandled::Reported` to `ConstKind::Error`.
[rust.git] / src / test / ui / consts / issue-68542-closure-in-array-len.stderr
1 error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
2   --> $DIR/issue-68542-closure-in-array-len.rs:6:13
3    |
4 LL |     a: [(); (|| { 0 })()]
5    |             ^^^^^^^^^^^^
6
7 error[E0080]: evaluation of constant value failed
8   --> $DIR/issue-68542-closure-in-array-len.rs:6:13
9    |
10 LL |     a: [(); (|| { 0 })()]
11    |             ^^^^^^^^^^^^ calling non-const function `Bug::a::{{constant}}#0::{{closure}}#0`
12
13 error: aborting due to 2 previous errors
14
15 Some errors have detailed explanations: E0015, E0080.
16 For more information about an error, try `rustc --explain E0015`.