fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0379]: functions in traits cannot be declared const 2 --> $DIR/issue-54954.rs:5:5 3 | 4LL | const fn const_val<T: Sized>() -> usize { 5 | ^^^^^ functions in traits cannot be const 6 7error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type 8 --> $DIR/issue-54954.rs:1:24 9 | 10LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait 12... 13LL | / const fn const_val<T: Sized>() -> usize { 14LL | | 15LL | | core::mem::size_of::<T>() 16LL | | } 17 | |_____- `Tt::const_val` defined here 18 19error: aborting due to 2 previous errors 20 21Some errors have detailed explanations: E0379, E0790. 22For more information about an error, try `rustc --explain E0379`.