]>
Commit | Line | Data |
---|---|---|
74b04a01 | 1 | error[E0379]: functions in traits cannot be declared const |
17df50a5 | 2 | --> $DIR/issue-54954.rs:5:5 |
48663c56 XL |
3 | | |
4 | LL | const fn const_val<T: Sized>() -> usize { | |
74b04a01 | 5 | | ^^^^^ functions in traits cannot be const |
48663c56 | 6 | |
60c5eb7d | 7 | error[E0283]: type annotations needed |
17df50a5 | 8 | --> $DIR/issue-54954.rs:1:24 |
48663c56 XL |
9 | | |
10 | LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); | |
60c5eb7d | 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type |
e74abb32 XL |
12 | ... |
13 | LL | const fn const_val<T: Sized>() -> usize { | |
ba9703b0 | 14 | | - required by this bound in `Tt::const_val` |
60c5eb7d | 15 | | |
ba9703b0 | 16 | = note: cannot satisfy `_: Tt` |
e74abb32 | 17 | |
ba9703b0 | 18 | error: aborting due to 2 previous errors |
48663c56 | 19 | |
ba9703b0 XL |
20 | Some errors have detailed explanations: E0283, E0379. |
21 | For more information about an error, try `rustc --explain E0283`. |