]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-54954.stderr
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[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: aborting due to 2 previous errors
16
17 Some errors have detailed explanations: E0283, E0379.
18 For more information about an error, try `rustc --explain E0283`.