We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edcbcc7 commit 5a40b6bCopy full SHA for 5a40b6b
tests/ui/consts/issue-116796.rs
@@ -0,0 +1,3 @@
1
+struct X<const FN: fn() = { || {} }>;
2
+//~^ ERROR using function pointers as const generic parameters is forbidden
3
+fn main() {}
tests/ui/consts/issue-116796.stderr
@@ -0,0 +1,10 @@
+error: using function pointers as const generic parameters is forbidden
+ --> $DIR/issue-116796.rs:1:20
+ |
4
+LL | struct X<const FN: fn() = { || {} }>;
5
+ | ^^^^
6
7
+ = note: the only supported types are integers, `bool` and `char`
8
+
9
+error: aborting due to 1 previous error
10
0 commit comments