Skip to content

Commit 9520925

Browse files
committed
add test
1 parent 87ec568 commit 9520925

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(generic_const_exprs, adt_const_params)]
2+
#![allow(incomplete_features)]
3+
4+
struct FieldElement<const N: &'static str> {
5+
n: [u64; num_limbs(N)],
6+
//~^ ERROR unconstrained generic constant
7+
}
8+
const fn num_limbs(_: &str) -> usize {
9+
0
10+
}
11+
12+
fn main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: unconstrained generic constant
2+
--> $DIR/issue-90455.rs:5:8
3+
|
4+
LL | n: [u64; num_limbs(N)],
5+
| ^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: try adding a `where` bound using this expression: `where [(); num_limbs(N)]:`
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)