1 error[E0379]: functions in traits cannot be declared const
2 --> $DIR/issue-54954.rs:5:5
4 LL | const fn const_val<T: Sized>() -> usize {
5 | ^^^^^ functions in traits cannot be const
7 error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
8 --> $DIR/issue-54954.rs:1:24
10 LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait
13 LL | / const fn const_val<T: Sized>() -> usize {
15 LL | | core::mem::size_of::<T>()
17 | |_____- `Tt::const_val` defined here
19 error[E0080]: evaluation of constant value failed
20 --> $DIR/issue-54954.rs:11:15
22 LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
23 | ^^^^^^^ referenced constant has errors
25 error[E0080]: evaluation of constant value failed
26 --> $DIR/issue-54954.rs:11:34
28 LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] {
29 | ^^^^^^^ referenced constant has errors
31 error: aborting due to 4 previous errors
33 Some errors have detailed explanations: E0080, E0379, E0790.
34 For more information about an error, try `rustc --explain E0080`.