]>
Commit | Line | Data |
---|---|---|
1b1a35ee XL |
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 |