File tree 2 files changed +5
-3
lines changed
src/test/ui/const-generics
const_evaluatable_checked
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- error: constant expression depends on a generic parameter
1
+ error: overly complex generic constant
2
2
--> $DIR/let-bindings.rs:6:68
3
3
|
4
4
LL | fn test<const N: usize>() -> [u8; { let x = N; N + 1 }] where [u8; { let x = N; N + 1 }]: Default {
5
- | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `test`
5
+ | ^^^^^^-^^^^^^^^^^^^^
6
+ | |
7
+ | unsupported statement
6
8
|
7
9
= help: consider moving this anonymous constant into a `const` function
8
10
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ error: constant expression depends on a generic parameter
8
8
--> $DIR/issue-76595.rs:15:5
9
9
|
10
10
LL | fn test<T, const P: usize>() where Bool<{core::mem::size_of::<T>() > 4}>: True {
11
- | ---- required by this bound in `test`
11
+ | --------------------------- ---- required by this bound in `test`
12
12
...
13
13
LL | test::<2>();
14
14
| ^^^^^^^^^
You can’t perform that action at this time.
0 commit comments