]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-54954.stderr
implement valtrees as the type-system representation for constant values
[rust.git] / src / test / ui / issues / issue-54954.stderr
1 error[E0379]: functions in traits cannot be declared const
2   --> $DIR/issue-54954.rs:5:5
3    |
4 LL |     const fn const_val<T: Sized>() -> usize {
5    |     ^^^^^ functions in traits cannot be const
6
7 error[E0283]: type annotations needed
8   --> $DIR/issue-54954.rs:1:24
9    |
10 LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
11    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
12    |
13    = note: cannot satisfy `_: Tt`
14
15 error[E0080]: evaluation of constant value failed
16   --> $DIR/issue-54954.rs:11:15
17    |
18 LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
19    |               ^^^^^^^ referenced constant has errors
20
21 error[E0080]: evaluation of constant value failed
22   --> $DIR/issue-54954.rs:11:34
23    |
24 LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
25    |                                  ^^^^^^^ referenced constant has errors
26
27 error: aborting due to 4 previous errors
28
29 Some errors have detailed explanations: E0080, E0283, E0379.
30 For more information about an error, try `rustc --explain E0080`.