]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-54954.stderr
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-54954.stderr
CommitLineData
74b04a01 1error[E0379]: functions in traits cannot be declared const
17df50a5 2 --> $DIR/issue-54954.rs:5:5
48663c56
XL
3 |
4LL | const fn const_val<T: Sized>() -> usize {
74b04a01 5 | ^^^^^ functions in traits cannot be const
48663c56 6
60c5eb7d 7error[E0283]: type annotations needed
17df50a5 8 --> $DIR/issue-54954.rs:1:24
48663c56
XL
9 |
10LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
60c5eb7d 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
e74abb32
XL
12...
13LL | 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 18error: aborting due to 2 previous errors
48663c56 19
ba9703b0
XL
20Some errors have detailed explanations: E0283, E0379.
21For more information about an error, try `rustc --explain E0283`.