We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87ec568 commit 9520925Copy full SHA for 9520925
src/test/ui/const-generics/issues/issue-90455.rs
@@ -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() {}
src/test/ui/const-generics/issues/issue-90455.stderr
@@ -0,0 +1,10 @@
+error: unconstrained generic constant
+ --> $DIR/issue-90455.rs:5:8
+ |
+LL | n: [u64; num_limbs(N)],
+ | ^^^^^^^^^^^^^^^^^^^
+ = help: try adding a `where` bound using this expression: `where [(); num_limbs(N)]:`
+error: aborting due to previous error
0 commit comments