fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0379]: functions in traits cannot be declared const 2 --> $DIR/issue-54954.rs:7:5 3 | 4LL | const fn const_val<T: Sized>() -> usize { 5 | ^^^^^ functions in traits cannot be const 6 7error[E0283]: type annotations needed 8 --> $DIR/issue-54954.rs:3:24 9 | 10LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type 12... 13LL | const fn const_val<T: Sized>() -> usize { 14 | --------- - required by this bound in `Tt::const_val` 15 | 16 = note: cannot resolve `_: Tt` 17 18error[E0080]: evaluation of constant value failed 19 --> $DIR/issue-54954.rs:13:15 20 | 21LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] { 22 | ^^^^^^^ referenced constant has errors 23 24error[E0080]: evaluation of constant value failed 25 --> $DIR/issue-54954.rs:13:34 26 | 27LL | fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] { 28 | ^^^^^^^ referenced constant has errors 29 30error: aborting due to 4 previous errors 31 32Some errors have detailed explanations: E0080, E0283, E0379. 33For more information about an error, try `rustc --explain E0080`.