]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-76701-ty-param-in-const.full.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-76701-ty-param-in-const.full.stderr
1 error: constant expression depends on a generic parameter
2 --> $DIR/issue-76701-ty-param-in-const.rs:6:21
3 |
4 LL | fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: this may fail depending on what value the parameter takes
8
9 error: constant expression depends on a generic parameter
10 --> $DIR/issue-76701-ty-param-in-const.rs:12:37
11 |
12 LL | fn const_param<const N: usize>() -> [u8; N + 1] {
13 | ^^^^^^^^^^^
14 |
15 = note: this may fail depending on what value the parameter takes
16
17 error: aborting due to 2 previous errors
18